LabVIEW 开发技术丛书 控制设计与仿真实战篇

Size: px
Start display at page:

Download "LabVIEW 开发技术丛书 控制设计与仿真实战篇"

Transcription

1 LabVIEW 开发技术丛书 控制设计与仿真实战篇

2 录目录 Modeling DC Motor Position 1-8 Motor Position PID Control 9-18 Root Locus Design Method for Motor Position Control Frequency Design Method for Motor Position Control State-Space Design Method for Motor Position Control Motor Position Digital Control Simulation Modeling for DC Motor Position 67-78

3 Modeling DC Motor Position Physical Setup A common actuator in control systems is the DC motor. It directly provides rotary motion and, coupled with wheels or drums and cables, can provide transitional motion. The electric circuit of the armature and the free body diagram of the rotor are shown in the following figure: Figure 1: DC Motor Circuit and Free Body Diagram For this example, we will assume the following values for the physical parameters. These values were derived by experiment from an actual motor in Carnegie Mellon University's undergraduate controls lab. moment of inertia of the rotor (J) = E-6 kg.m^2/s^2 damping ratio of the mechanical system (b) = E-6 Nms electromotive force constant (K=Ke=Kt) = Nm/Amp electric resistance (R) = 4 ohm electric inductance (L) = 2.75E-6 H input (V): Source Voltage output (theta): position of shaft The rotor and shaft are assumed to be rigid System Equations The motor torque, T, is related to the armature current, i, by a constant factor Kt. The back emf, e, is related to the rotational velocity by the following equations: 1

4 In SI units (which we will use), Kt (armature constant) is equal to Ke (motor constant). From the figure above we can write the following equations based on Newton's law combined with Kirchhoff's law: Transfer Function Using Laplace Transforms, the above equations can be expressed in terms of s: By eliminating I(s), we can get the following transfer function, where the rotating speed is the output and the voltage is an input: However, during this example we will be looking at the position as the output. We can obtain the position by integrating Theta Dot, so we just need to divide the transfer function by s. State-Space Model These equations can also be represented in state-space form. If we choose motor position, motor speed, and armature current as our state variables, we can write the equations as follows: Design Requirements We will want to be able to position the motor very precisely, thus the steady-state error of the motor position should be zero. We will also want the steady-state error due to a disturbance, to be zero as well. The other performance 2

5 requirement is that the motor reaches its final position very quickly. In this case, we want it to have a settling time of 40ms. We also want to have an overshoot smaller than 16%. If we simulate the reference input (R) by a unit step input, then the motor speed output should have: Settling time less than 40 milliseconds Overshoot less than 16% No steady-state error No steady-state error due to a disturbance State-Space Model in LabVIEW We can represent the state-space equations in LabVIEW using either a graphical or a hybrid graphical/textual approach. LabVIEW Graphical Approach Begin with a blank VI. Insert the CD Construct State Space Model VI from the Model Construction section of the Control Design palette, and create controls for each of the inputs. Figure 2: Construct State-Space Model Next, add the CD Draw State-Space Equation VI. This will display the state-space equation on the front panel. Create an output for the Equation from the CD Draw State-Space Equation VI. Figure 3: Display State-Space Equation Now add the CD Step Response VI from the Time Response section of the Control Design palette. Create a control for the Time Info input and an indicator for the Step Response Graph output. 3

6 Figure 4: Step Response VI (Download) This should result in a front panel that looks like this: Hybrid Graphical/MathScript Approach Figure 5: State-Space Front Panel (Download) Alternatively, we can get the same results with a hybrid approach, using the MathScript Node. Begin with a blank VI, and insert a MathScript Node from the Structures palette. Add the following code to your MathScript Node: J=3.2284E-6; b=3.5077e-6; K=0.0274; R=4; L=2.75E-6; 4

7 A=[ b/j K/J 0 -K/L -R/L]; B=[0 ; 0 ; 1/L]; C=[1 0 0]; D=[0]; motor=ss(a,b,c,d); Then create a State-Space output from the Node, and add the CD Draw State-Space Equation VI and the CD Step Response VI as we did in the graphical approach. Transfer Function in LabVIEW Figure 6: Hybrid Graphical/MathScript Block Diagram (Download) Another option is to represent the transfer function in LabVIEW, instead of using the state-space model. LabVIEW Graphical Approach To represent the transfer function using a LabVIEW graphical approach, begin by inserting the CD Construct Transfer Function Model VI (from the Model Construction section of the Control Design palette) into a blank VI. Create controls for the Numerator, Denominator, and Variables inputs. Figure 7: Construct Transfer Function Equation Next, add the CD Draw Transfer Function Equation VI to the block diagram, and create an indicator for the Equation output. This will display the transfer function equation on the front panel. 5

8 Figure 8: Draw Transfer Function Equation Now add the CD Step Response VI from the Time Response section of the Control Design palette. Create a control for the Time Info input and an indicator for the Step Response Graph output. Figure 9: Step Response VI (Download) This should result in a front panel that looks like this: Figure 10: Transfer Function Front Panel (Download) 6

9 Hybrid Graphical/MathScript Approach Alternatively, we can get the same results with a hybrid approach, using the MathScript Node. Begin with a blank VI, and insert a MathScript Node from the Structures palette. Add the following code to your MathScript Node: J=3.2284E-6; b=3.5077e-6; K=0.0274; R=4; L=2.75E-6; num=k; den=[(j*l) ((J*R)+(L*b)) ((b*r)+k^2) 0]; motor=tf(num,den); Create a Transfer Function output from the Node, and then add the CD Draw State-Space Equation VI and the CD Step Response VI as we did in the graphical approach. Result Figure 11: Hybrid Graphical/MathScript Block Diagram (Download) Using either the state-space model or the transfer function, you should see the following step response graph on the front panel when you run the VI: 7

10 Figure 12: Step Response for Open-Loop System From the plot, we see that when 1 volt is applied to the system, the motor position changes by 6 radians, six times greater than our desired position. For a 1 volt step input, the motor should spin through 1 radian. Also, the motor doesn't reach a steady state, which does not satisfy our design criteria. 8

11 Motor Position PID Control PID Design Method for DC Motor Position From the main problem, the dynamic equation in transfer function form is the following: The system schematic looks like: For the original problem setup and the derivation of the above equations, please refer to themodeling DC Motor Position page. With a 1 rad/sec step reference, the design criteria are: Settling time less than 0.04 seconds Overshoot less than 16% No steady-state error No steady-state error due to a disturbance Proportional Control Now let's design a PID controller and add it into the system. Recall that the transfer function for a PID controller is: Let's first try using a proportional controller with a gain of 1.7. LabVIEW Graphical Approach Start by creating a VI to model the transfer function for the motor. For an explanation of how to create this model, refer to the Modeling DC Motor Position page. 9

12 Figure 1: Construct Motor Transfer Function Next, create a transfer function for the controller. Add a second CD Construct Transfer Function Model VI from the Model Construction section of the Control Design palette. Create controls for the Symbolic Numerator and Variables inputs. Figure 2: Construct Controller Transfer Function Put these models in series using a CD Series VI. Figure 3: Models in Series 10

13 Now add a CD Feedback VI, and connect the output from the CD Series VI to the Model 1 input of the CD Feedback VI. We use the Feedback VI to determine the closed-loop transfer function. Next, create another transfer function model. Create a constant input for the numerator, and set this equal to 1. Connect this new transfer function to the Model 2 input of the CD Feedback VI. Figure 4: Models in Series with Feedback VI Now add a CD Step Response VI, connect the output from the CD Feedback VI to the input of the CD Step Response VI, and create a Time Response input and a Step Response Graph output for the CD Step Response VI. On the front panel, set the Time Info so that t0 = 0, dt = 0.001, and tf = 0.2. Figure 5: Finished Block Diagram for Proportional Control When you run the VI, you should see the following plot on the front panel: 11

14 Hybrid Graphical/MathScript Approach Figure 6: Response to Step Input, Kp = 1.7 Alternatively, you can achieve the same results using a hybrid graphical/mathscript approach. Begin by creating a blank VI, and add a MathScript Node. Paste the following code into your MathScript Node: J=3.2284E-6; b=3.5077e-6; K=0.0274; R=4; L=2.75E-6; num=k; den=[(j*l) ((J*R)+(L*b)) ((b*r)+k^2) 0]; motor=tf(num,den); Kp=1.7; contr=kp; sys_cl=feedback(contr*motor,1); We use the 'feedback' command to determine the closed-loop transfer function. Create an output called sys_cl, and change its type to a TF Object. Add the CD Step Response VI to your block diagram, and connect the sys_cl output to the Transfer Function Model input of the Step Response VI. Finally, create a control for the Time Response terminal and an indicator for the Step Response Graph output. On the front panel, set t0 to 0, dt to.001, and tf to 0.2. The block diagram should look like this: 12

15 Figure 7: Proportional Control, Hybrid Approach (Download) Running this VI should result in a graph similar to the one in Figure 6. LabVIEW MathScript Approach To achieve this result using MathScript, open the MathScript Window and paste the above code into the Command Window. Add the following lines of code to the end: t=0:0.001:0.2; step(sys_cl,t) Running this code should result in a graph similar to Figure 6. Step Disturbance Response To look at the step disturbance response for the system, and if you are using a graphical approach, connect the motor and controller models to the inputs of another CD Feedback VI, then create inputs and outputs to the VI as we did before. Figure 8: Block Diagram for Proportional Control with Step Disturbance (Download) If you are using a hybrid or MathScript approach, add the following code to your MathScript Node, and create an output for dist_cl: 13

16 dist_cl=feedback(motor,contr); All of these methods should result in the following plot: PID Control Figure 9: Response to Step Disturbance, Kp = 1.7 From the plots above, we see that although the steady-state error looks good, the settling time is too large, as is the overshoot. We also see that the steady-state error to a disturbance is large. Recall from the PID tutorial page that adding an integral term will eliminate the steady-state error and a derivative term will reduce the overshoot. Let's first try a PI controller to get rid of the disturbance steady state error. LabVIEW Graphical Approach To achieve this with a graphical approach, add on to the VI that we created earlier. Create a control for the Symbolic Denominator input for the controller transfer function VI. Figure 10: PID Control Block Diagram with Step Disturbance (Download) Change your front panel values so that the values for the controller numerator are "Ki Kp" and the values for its denominator are "0 1". Change the controller variables on the front panel so that the variable Kp has a value of 1.7, and Ki has a value of

17 Running this VI should give you the following Step Response plot: Figure 11: Response to Step Input, Kp = 1.7, Ki = 20 Also, you should see the following Step Disturbance plot: Figure 12: Response to Step Disturbance, Kp = 1.7, Ki = 20 The integral control has reduced the steady state error to zero. Hybrid Graphical/MathScript Approach If you are using a hybrid approach, change your MathScript code so that it looks like the following: J=3.2284E-6; b=3.5077e-6; K=0.0274; R=4; L=2.75E-6; num=k; den=[(j*l) ((J*R)+(L*b)) ((b*r)+k^2) 0]; motor=tf(num,den); 15

18 Kp=1.7; Ki=20; contr=tf([kp Ki],[1 0]); sys_cl=feedback(contr*motor,1); Running this VI should result in a similar response to Figure 11. To see what happened to the step disturbance response, add the following code to your MathScript Node: dist_cl=feedback(motor,contr); Change the sys_cl output name to dist_cl and run the VI. You should see a plot similar to Figure 12. Tuning the Gains Although the steady state error has been removed, the settling time is still too long. Let's increase the gains in order to speed up the response. Change Ki to 200 and Kp to 17. Rerun your VI, and you should get plots like these: Figure 13: Response to Step Input, Kp = 17, Ki = 200 Figure 14: Response to Step Disturbance, Kp = 17, Ki = 200 Now we see that the response is faster than before, but the large Ki has worsened the transient response (big overshoot). Let's now try adding a derivative term to reduce the overshoot. If you are using a graphical approach, change your front panel values so that the controller numerator has "Ki Kp Kd", the denominator has "0 1", and the variables have Kp = 17, Ki = 200, and Kd = To do this with the hybrid approach, make the following changes to your MathScript code: 16

19 Kp=17; Ki=200; Kd=0.15; contr=tf([kd Kp Ki],[1 0]); sys_cl=feedback(contr*motor,1); You should now get this plot: Figure 15: Response to Step Input, Kp = 17, Ki = 200, Kd = 0.15 And your step disturbance plot should look like this: Figure 16: Response to Step Disturbance, Kp = 17, Ki = 200, Kd = 0.15 We now see that our step response looks really good. It has less than 16% overshoot, the settling time is roughly 40 ms, and there is no steady-state error. However, the step disturbance response is now really slow. Lets increase Ki to speed up the disturbance response. Change Ki to 600 and rerun your VI. You should get the following plots: 17

20 Figure 17: Response to Step Input, Kp = 17, Ki = 600, Kd = 0.15 Figure 18: Response to Step Disturbance, Kp = 17, Ki = 600, Kd = 0.15 We now can see that the step response has a settling time of roughly 40 ms, it has less than 16% overshoot, and it has no steady state error. The step disturbance response also has no steady state error. So now we know that if we use a PID controller with Kp=17 Ki=600 Kd=.15 all of our design requirements will be satisfied. 18

21 Root Locus Design Method for Motor Position Control From the main problem, the dynamic equations in transfer function form are the following: and the system schematic looks like: For the original problem setup and the derivation of the above equations, please refer to themodeling DC Motor Position page. With a 1 rad/sec step reference, the design criteria are: Settling time less than 0.04 seconds Overshoot less than 16% No steady-state error to a reference No steady-state error due to a disturbance Now let's design a controller using the root locus method. Open the MathScript Window (Tools >> MathScript Window) and click on the Script tab to view the Script Editor. Type the following commands in the Script Editor: J=3.2284E-6; b=3.5077e-6; K=0.0274; R=4; L=2.75E-6; num=k; 19

22 den=[(j*l) ((J*R)+(L*b)) ((b*r)+k^2) 0]; motor=tf(num,den); Drawing the Open-Loop Root Locus The main idea of root locus design is to find the closed-loop response from the open-loop root locus plot. Then by adding zeros and/or poles to the original plant, the closed-loop response will be modified. Let's first view the root locus for the plant. Add the following commands to your MathScript code in the Script Editor: rlocus(motor) sgrid on Now, run your script by clicking on the button with a green arrow at the top of the Script Editor. You should see the root locus plot below: Figure 1: Root Locus - P Control If you look at the axis scales on this plot, one open-loop pole is very far to the left (further than -1x10^6). This pole does not affect the closed loop dynamics unless very large gains are used, where the system becomes unstable. We will ignore this pole by doing a model reduction. Model Reduction If you have a transfer function which has one (or more) poles to the far left of the dominant poles, you can neglect these poles and the closed-loop response for small gains will not be affected (for large gains, these poles will push the root locus to the right-half plane, causing instability). The correct way to neglect these poles, keeping the DC gain of the transfer function constant, is as follows: 20

23 Let's see what the poles of the original transfer function are. Enter the following command in the Command Window (bottom left corner of the MathScript Window): roots(den) You should see the following output: ans = e+006 We want to neglect the pole at -1.45e6. This can be translated into MathScript code. Replace your code in the Script Editor with the following: J=3.2284E-6; b=3.5077e-6; K=0.0274; R=4; L=2.75E-6; num=k; den=[(j*l) ((J*R)+(L*b)) ((b*r)+k^2) 0]; poles=roots(den); den2=deconv(den,[1/max(abs(poles)) 1]); motor=tf(num,den2); Run this script. You can now check that the other poles have not been affected by entering the following code in the Command Window: roots(den2) Now we can draw the root locus of the reduced system. Add the following commands to the end of your code in the Script Editor and re-run it. rlocus(motor) sgrid on axis([ ]) You should obtain the following plot in which you can see that the closed-loop system will be stable for small gains: 21

24 Figure 2: Root Locus - P Control We can see from this plot that the closed-loop poles are never fast enough to meet the settling time requirement (that is, they never move to the left of the sigma=100 vertical line). Also, recall that we need an integrator in the controller (not just in the system) to remove steady-state error due to a disturbance. Integral Control Now, let's try using integral control to remove steady-state error to a disturbance. Replace your code in the Script Editor with the following: J=3.2284E-6; b=3.5077e-6; K=0.0274; R=4; L=2.75E-6; num=k; den=[(j*l) ((J*R)+(L*b)) ((b*r)+k^2) 0]; poles=roots(den); den2=deconv(den,[1/max(abs(poles)) 1]); motor=tf(num,den2); contr=tf(1,[1 0]); 22

25 rlocus(contr*motor) sgrid on axis([ ]) Note that this adds a 1/s term to the forward loop. Run this script, and you should see the following plot: Figure 3: Root Locus - I Control From this root locus, we can see that the closed-loop system under integral control is never stable, and another controller must be used. Proportional and Integral Control Now, let's modify the integral controller to a PI controller. Using PI instead of I control adds a zero to the open-loop system. We'll place this zero at s=-20. The zero must lie between the open-loop poles of the system in this case so that the closed-loop will be stable. Change the line defining the controller in your script to the following. contr=tf([1 20],[1 0]); Re-run your script, and you should see the following plot: 23

26 Figure 4: Root Locus - PI Control Now, we have managed to stabilize the system with zero steady-state error to a disturbance, but the system will still not be fast enough. Proportional, Integral, and Derivative Control In order to pull the root locus further to the left, to make it faster, we need to place a second open-loop zero, resulting in a PID controller. After some experimentation, we can place the two PID zeros at s=-60 and s=-70. Change the line defining the controller in your script to the following: numc=conv([1 60],[1 70]); denc=[1 0]; contr=tf(numc,denc); Re-run your script, and you should obtain the following plot. 24

27 Figure 5: Root Locus - PID Control Now, we can see that two of the closed-loop poles loop around well within both the settling time and percent overshoot requirements. The third closed-loop pole moves from the open-loop pole at s=-59.2 to the open loop zero at s=-60. This closed-loop pole nearly cancels with the zero (which remains in the closed loop transfer function) because it is so close. Therefore, we can ignore its effect. However, the other open-loop zero also remains in the closed-loop, and will affect the response, slowing it down, and adding overshoot. Therefore, we have to be conservative in picking where on the root locus we want the closed-loop poles to lie. Finding the Gain If you recall, we need the settling time and the overshoot to be as small as possible, particularly because of the effect of the extra zero. Large damping corresponds to points on the root locus near the real axis. A fast response corresponds to points on the root locus far to the left of the imaginary axis. To find the gain corresponding to a point on the root locus, we can use the rlocfind command. We can find the gain and plot the step response using this gain all at once. To do this, enter the following command in the Command Window: [k,poles] = rlocfind(contr*motor) A window titled Interactive Root Locus should appear. In this window, drag either the Gain slider or the red x marks, so that the roots on the loop end up close to the real axis, as shown below. This will ensure that the response will be as fast as possible with as little overshoot as possible. These pole locations would indicate that the response would have almost no overshoot, but you must remember that the zero will add some overshoot. 25

28 Figure 6: Interactive Root Locus Window When you are satisfied with the pole locations you have chosen, click OK. After doing this, you should see the following output in the Output Window section of the MathScript Window. k = poles = i i i Note that the values returned in your MathScript Output Window may not be exactly the same, but should at least have the same order of magnitude. Next, add the following code to the end of your script, and run it. sys_cl=feedback(k*contr*motor,1); t=0:0.001:.1; step(sys_cl,t) You should get the following step response plot: 26

29 Figure 7: Response to Step Input with PID As you can see, the system has an overshoot of approximately 15%, a settling time of approximately 0.04 seconds, and no steady-state error. Let's now look at the disturbance response by computing the closed-loop disturbance transfer function and plotting its step response. Add the following lines to the end of your script: dist_cl=feedback(motor,k*contr); step(dist_cl,t) Re-run your script, and you should get the following plot: 27

30 Figure 8: Response to Step Disturbance with PID You can see that the response to a step disturbance reaches a steady-state value of zero, and in fact, stays within 0.02 (or 2%) after 0.04 seconds. Therefore, all the design requirements have been met. In this example, we placed zeros on the root locus to shape it the way we wanted. While some trial-and error is necessary to place the zeros, it is helpful to understand how the root locus is drawn, and LabVIEW MathScript is used to verify and refine the placement. 28

31 Frequency Design Method for Motor Position Control Drawing the Original Bode Plot The main idea of frequency-based design is to use the Bode plot of the open-loop transfer function to estimate the closed-loop response. Adding a controller to the system changes the open-loop Bode plot, therefore changing the closed-loop response. Let's first draw the Bode plot for the original open-loop transfer function. LabVIEW Graphical Approach Using the approach that was introduced in the Frequency Response Tutorial, create a transfer function for the system and output the resulting bode plot. Figure 1: Open-Loop Transfer Function - Block Diagram (Download) 29

32 LabVIEW MathScript Approach Figure 2: Open-Loop Transfer Function - Front Panel (Download) Alternatively, you can achieve the same results using a MathScript approach. Open the MathScript Window (Tools >> MathScript Window) and click on the Script tab to view the Script Editor. Type the following commands in the Script Editor: J = E-6; b = E-6; K = ; R = 4; L = 2.75E-6; num = K; den = [(J*L) ((J*R)+(L*b)) ((b*r)+k^2) 0]; motor = tf(num,den); 30

33 The main idea of frequency-based design is to use the Bode plot of the open-loop transfer function to estimate the closed-loop response. Adding a controller to the system changes the open-loop Bode plot, therefore changing the closed-loop response. Let's first draw the Bode plot for the original open-loop transfer function. Add the following code to the end of your code, and then run the script. Result w=logspace(0,4,101); bode(motor,w) Either approach should result in the following Bode plot: Adding an Integrator Figure 3: Original Open-Loop Transfer Function Now lets add an integrator for zero steady-state error in response to a step disturbance. LabVIEW Graphical Approach Create a second transfer function model to represent the controller. Place the controller model in series with the plant model, and draw the bode plot from the combined system. 31

34 Figure 4: Adding an Integrator - Block Diagram (Download) 32

35 LabVIEW MathScript Approach Figure 5: Adding an Integrator - Front Panel (Download) If you are using the MathScript approach, add the following lines to your existing code: numi = 1; deni = [1 0]; contr = tf(numi,deni); bode(contr*motor,w) Result Either approach should result in the following plot: 33

36 Figure 6: System with Integrator for Zero Steady-State Error Gain and Phase Margin Specifications and Controller Design From the Bode phase plot we can see that there is a pole near 60 rad/sec. We will use a PI controller to put a zero at s=60 to flatten out the phase curve. LabVIEW Graphical Approach Using the previous VI, modify the controller so that the controller transfer function is (s+60)/s. LabVIEW MathScript Approach If you are using the MathScript approach, add the following lines to your script: numpi = [1 60]; denpi = [1 0]; contr = tf(numpi,denpi); bode(contr*motor,w) Result Either approach should result in the following plot: 34

37 Figure 7: System with PI Controller We want less than a 16% overshoot, so let's compute the damping ratio based on a 16% overshoot. Also the corresponding phase margin is 100 times the damping ratio. From the settling time requirement, we are able to compute the desired bandwidth frequency. We want to have at least 50 degrees of phase margin, therefore the gain should fall between -6 and -7.5 db at some frequency after 250 rad/sec. From the Bode plot we see that we must add about 80 degrees of phase and 60 db of gain at a frequency of 250 rad/sec. The gain plot will then lie between -6 and -7.5 db and after 244 rad/sec. From the previous bode plot, we can see that we need 50 more degrees of phase at a frequency of 250 rad/sec. Lets now try a lead compensator to add exactly 50 degrees of phase. LabVIEW Graphical Approach Using the previous VI, insert a CD Series VI into the block diagram, between the existing CD Series VI and the CD Bode VI. Create a MathScript node, create a transfer function output called 'contr2', and paste the following code into the node: zeta = -log(.16)/sqrt(pi^2+(log(.16))^2); PM = 100*zeta; wbw = (4/(0.04*zeta))*sqrt((1-2*zeta^2)+sqrt(4*zeta^4-4*zeta^2+2)); a = (1 - sin(pm*pi/180))/(1 + sin(pm*pi/180)); T = 1/(wbw*sqrt(a)); contr2 = tf([t 1],[a*T 1]); 35

38 Your block diagram should look like this: LabVIEW MathScript Approach Figure 8: Gain and Phase Margin Compensator - Block Diagram (Download) If you are using the MathScript approach, add the following lines to your existing code: zeta = -log(.16)/sqrt(pi^2+(log(.16))^2); PM = 100*zeta; wbw = (4/(0.04*zeta))*sqrt((1-2*zeta^2)+sqrt(4*zeta^4-4*zeta^2+2)); Next, add the following lines to the end of your script: a = (1 - sin(pm*pi/180))/(1 + sin(pm*pi/180)); T = 1/(wbw*sqrt(a)); contr2 = tf([t 1],[a*T 1]); w = logspace(2,3,101); bode(contr*contr2*motor,w) 36

39 Result Either approach should result in the following plot: Figure 9: System with Lead Compensator This new Bode plot now shows that the phase margin is about right at 250 rad/sec, but the gain is too small by about 20 db. The gain crossover must occur at 240 rad/sec. To bring the gain up by 20 db we will multiply by a gain of 10. LabVIEW Graphical Approach Add an additional transfer function model and put it in series with the previous controller. Create a numeric constant for the numerator, and set its value to

40 LabVIEW MathScript Approach Figure 10: System With Gain of 10 - Block Diagram (Download) Add the following lines to the end of your script: Kp = 10; bode(kp*contr*contr2*motor,w) Result With either approach, you should get the following plot: 38

41 Figure 11: System with Gain of 10 Let's now check the step response of the closed loop system. LabVIEW Graphical Approach Place a CD Feedback VI on the block diagram, and create a new transfer function with a numerator of 1 (as we did in the tutorial). This Model 1 input for the feedback VI should come from the output of the previous CD Series VI, and the Model 2 input should come from the new transfer function model. Place a CD Step Response VI on the block diagram, and use the output from the feedback VI as the Step Response input. On the front panel, set the time constraints so that t0 = 0, dt = 0.001, and tf =

42 Figure 12: Block Diagram for Step Response of System LabVIEW MathScript Approach Type the following code in the Command Window: sys_cl = feedback(kp*contr*contr2*motor,1); t = 0:0.001:0.1; step(sys_cl,t) Result With either approach, you should get the following plot: 40

43 Figure 13: Step Response of the Closed-Loop System The overshoot is now too large, however the settling time is better than expected. So let's try another design where the phase margin is larger, say around 70 degrees. LabVIEW Graphical Approach On the block diagram, change the value of PM in the MathScript Node. Replace the second line of code with: PM = 70; LabVIEW MathScript Approach Add the following lines to the end of your script: PM = 70; a = (1 - sin(pm*pi/180))/(1 + sin(pm*pi/180)); T = 1/(wbw*sqrt(a)); contr2 = tf([t 1],[a*T 1]); w = logspace(2,3,101); bode(contr*contr2*motor,w) Result With either approach, you should get the following plot: 41

44 Figure 14: System with Phase Margin of 70 Degrees This new bode plot shows that the phase margin is good at around 250 rad/sec, but the gain is too small by about 14 db. The gain crossover must occur at 240 rad/sec. To bring the gain up we will multiply by a gain of 5. LabVIEW Graphical Approach On the block diagram, find the numeric constant for the numerator of the gain model, which was set to 10. Right-click the constant and change it to a control. On the front panel, change the control to a vertical slider by right-clicking the control and selecting 'Replace'. Run the VI, and change the value from 10 to 5. LabVIEW MathScript Approach Add the following lines to the end of your script: Kp=5; bode(kp*contr*contr2*motor,w) Result With either approach, you should get the following plot: 42

45 Figure 15: System with Gain of 5 Now let's check the step response again. LabVIEW Graphical Approach The resulting step response should appear on your front panel as you change the gain. LabVIEW MathScript Approach If you are using the MathScript approach, type the following code in the Command Window: sys_cl = feedback(kp*contr*contr2*motor,1); t = 0:0.001:0.1; step(sys_cl) Result With either approach, you should get the following step response:: 43

46 Figure 16: Step Response of Closed-Loop System From the step response we now see that the overshoot is fine, but the settling time is too long. Let's try a slightly higher bandwidth. LabVIEW Graphical Approach In the MathScript Node on the block diagram, insert the following just above the last line of code: wbw = 300; a = (1 - sin(pm*pi/180))/(1 + sin(pm*pi/180)); T = 1/(wbw*sqrt(a)); LabVIEW MathScript Approach Add the following lines to the end of your script: wbw = 300; a = (1 - sin(pm*pi/180))/(1 + sin(pm*pi/180)); T = 1/(wbw*sqrt(a)); contr2 = tf([t 1],[a*T 1]); w = logspace(2,3,101); bode(contr*contr2*motor,w) Result With either approach, you should get the following plot: 44

47 Figure 17: System with Higher Bandwidth This new bode plot shows that the phase margin is about right at a frequency of 250 rad/sec, but the gain is too small by about 18 db. The gain crossover must occur at 240 rad/sec. To bring the gain up we will multiply by a gain of 8. LabVIEW Graphical Approach Change the gain to 8 using the front panel slider. LabVIEW MathScript Approach Add the following lines to the end of your script: Kp = 8; bode(kp*contr*contr2*motor,w); Result With either approach, you should get the following plot: 45

48 Figure 18: System with Gain of 8 Now let's check the step response of the closed loop system. LabVIEW Graphical Approach The resulting step response should appear on your front panel as you change the gain. LabVIEW MathScript Approach Type the following code in the Command Window: sys_cl = feedback(kp*contr*contr2*motor,1); t = 0:0.001:0.1; step(sys_cl) Result With either approach, you should get the following step response: 46

49 Figure 19: Final Step Response of Closed-Loop System Now everything looks good. We have less than 16% overshoot and a settling time of about 40 milliseconds. Final LabVIEW VI The final VI block diagram should look like this: 47

50 Figure 20: Final Block Diagram (Download) Final MathScript Code The MathScript code below is the simplified version of what was done above. After you run this script, you will get the last two plots shown above. J = E-6; b = E-6; K = ; R = 4; L = 2.75E-6; num = K; 48

51 den = [(J*L) ((J*R)+(L*b)) ((b*r)+k^2) 0]; motor = tf(num,den); PM = 70; wbw = 300; a = (1-sin(PM*pi/180))/(1+sin(PM*pi/180)); T = 1/(wbw*sqrt(a)); numpi = [1 60]; denpi = [1 0]; contr = tf(numpi,denpi); contr2 = tf([t 1],[a*T 1]); Kp = 8; w = logspace(2,3,101); bode(kp*contr*contr2*motor,w) sys_cl = feedback(kp*contr*contr2*motor,1); t = 0:0.001:0.1; step(sys_cl) 49

52 State-Space Design Method for Motor Position Control From the main problem, the dynamic equations in state-space form are the following: For the original problem setup and the derivation of the above equations, please refer to themodeling DC Motor Position page. With a 1 rad reference added to the system, the design criteria are: Settling time less than 0.04 seconds Overshoot less than 16% Zero steady-state error to a step input Zero steady-state error to a step disturbance Open the MathScript Window (Tools >> MathScript Window) and click on the Script tab to view the Script Editor. Type the following commands in the Script Editor: J = E-6; b = E-6; K = ; R = 4; L = 2.75E-6; A = [ b/j K/J 0 -K/L -R/L]; B = [0 ; 0 ; 1/L]; C = [1 0 0]; D = [0]; sys=ss(a,b,c,d); 50

53 Designing the Full-State Feedback Controller Since all of the state variables in our problem are very easy to measure (simply add an ammeter for current, a tachometer for speed, and a potentiometer for position), we can design a full-state feedback controller for the system without worrying about having to add an observer. The schematic for a full-state feedback system is: Recall that the characteristic polynomial for this closed-loop system is the determinant of (si-(a-bkc)) where s is the Laplace variable. Since the matrices A and B*Kc are both 3x3 matrices, there should be 3 poles for the system. By designing a full-state feedback controller, we can move these three poles anywhere we want them. We shall first try to place them at i and i (note that this corresponds to a zeta = 0.5, which gives 0.16% overshoot, and a sigma = 100, which leads to a.04 sec settling time). Once we come up with the poles we want, LabVIEW will find the controller matrix, Kc, for us. Simply add the following code to the end of your script: p1 = i; p2 = i; p3 = -200; Kc = place(a,b,[p1,p2,p3]); Now look at the schematic above again. We see that after adding the K matrix into the system, the state-space equations become: To see the closed-loop response, add the following lines to your existing code: t = 0:0.001:.05; sys_cl=ss(a-b*kc,b,c,d); 51

54 step(sys_cl,t) When you run the script, you should see the following plot: Disturbance Response Figure 1: Closed-Loop Step Response with Full State Feedback In order to get the disturbance response, we must provide the proper input to the system. Physically, a disturbance is a torque which acts on the inertia of the motor. A torque acts as an additive term in the second state equation (which gets divided by J, as do all the other terms in this equation). We can simulate this simply by modifying our closed loop input matrix, B, to have a 1/J in the second row. Add the following code to your existing script and re-run it. dist_cl=ss(a-b*kc,[0;1/j;0],c,d); step(dist_cl,t) You should see the following plot when you run the script: 52

55 Figure 2: Disturbance Response with Full State Feedback This is not a zero steady-state error to a disturbance, and we will have to compensate for this. Adding Integral Action We know that if we put an extra integrator in series with the plant it can remove steady-state error to an input. If the integrator comes before the injection of the disturbance, it will cancel the disturbance in steady state. This changes our control structure so it now resembles the following: We can model the integrator by augmenting our state equations with an extra state which is the integral of the output. This adds an extra equation which states that the derivative of the integral of theta is theta. This equation will be placed at the top of our matrices. The input, r, now enters the system before the integrator, so it appears in the newly added top equation. The output of the system remains the same. 53

56 These equations represent the dynamics of the system before the loop is closed. We will refer to the matrices in this equation as Aa, Ba, Ca, and Da. We will refer to the state vector of the augmented system as xa. Note that the reference, r, does not affect the states (except the integrator state) or the output of the plant - this is expected, since there is no path from the reference to the plant input, u, without implementing the feedback matrix, Kc. In order to find the closed loop equations, we have to look at how the input, u, affects the plant. In this case, it is exactly the same as in the unaugmented equations. Therefore, there is a vector, call it Bau, which replaces Ba when we are treating u as the input. This is just our old B vector with an extra zero added as the first row. Since u=kc*xa is the input to the plant for the closed loop, but r is the input to the closed loop system, the closed loop equations will depend on both Bau and Ba. The closed loop equations will become: Now, the integral of the output will be fed back, and will be used by the controller to remove steady state error to a disturbance. We can now redesign our controller. Since we need to place one closed-loop pole for each pole in the plant, we will place another pole at -300, which will be faster than the rest of the poles. Since the closed-loop system matrix depends on Bau, we will use Bau in the place command rather that Ba. Add the following code to your existing script: Aa = [ b/j K/J 0 0 -K/L -R/L]; Ba = [ -1 ; 0 ; 0 ; 0]; Bau = [0 ; 0 ; 0 ; 1/L ]; Ca = [ ]; Da = [0]; p4 = -300; 54

57 Kc = place(aa,bau,[p1,p2,p3,p4]); t = 0:0.001:.05; sys_cl = ss(aa-bau*kc,ba,ca,da); step(sys_cl,t) Run your script, and you will get the following output: Figure 3: Step Response - Full State Feedback with Integrator To look at the disturbance response, we apply a similar B matrix as we did previously when simulating the disturbance response. dist_cl = ss(aa-bau*kc,[0 ; 0 ; 1/J ; 0],Ca,Da); step(dist_cl,t) 55

58 Figure 4: Disturbance Response - Full State Feedback with Integrator We can see that all of the design specifications have been met by this controller. 56

59 Motor Position Digital Control In this example, the controller will be designed by a Root Locus method. A digital DC motor model can obtain from conversion of analog DC motor model, as we will describe. According to themodeling DC Motor Position page, the open-loop transfer function for DC motor's position is: where: electric resistance (R) = 4 ohm electric inductance (L) = 2.75E-6 H electromotive force constant (K=Ke=Kt) = Nm/Amp moment of inertia of the rotor (J) = E-6 kg*m^2/s^2 damping ratio of the mechanical system (b) = E-6 Nms input (V): Source Voltage output (sigma dot): Rotating speed The rotor and shaft are assumed to be rigid The design requirements are: Settling time: Less than 0.04 seconds Overshoot: Less than 16% Steady-state error: 0 with a step disturbance input Continuous to Discrete Conversion The first step in the design of a discrete-time system is to convert a continuous transfer function to a discrete transfer function. LabVIEW MathScript can be used to convert the above transfer function to a discrete transfer function by using the c2d command. The c2d command requires three arguments: system, a sampling time (T) and a type of hold circuit. In this example we will use the zero-order hold (zoh). From the design requirement, let the sampling time, T, equal seconds, which is 1/100 of the required time constant or 1/40 of the required settling time. In LabVIEW, click Tools >> MathScript Window. In the MathScript Window, select the Script tab, and add the following code in the Script Editor: R = 4; L = 2.75E-6; K = ; J = E-6; b = E-6; 57

60 num = K; den = [(J*L) (J*R)+(L*b) (R*b)+(K^2) 0]; motor = tf(num,den) Ts = 0.001; motor_d = c2d(motor, Ts, 'zoh') [numd,dend] = tfdata(motor_d,'v') When you run this script, you should see the following result: Transfer Function Input:1 Output: z^ z z^ z^ z+0 Sampling time: numd = e-010 dend = e-017 In this result, notice that both the numerator and the denominator of the discrete transfer function have one extra root at z = 0. Also, we can get rid of the leading zero coefficient in the numerator. To do this, we will cancel out the extra pole and zero to avoid numerical problems. Otherwise, LabVIEW will consider both the numerator and denominator to be fourth-order polynomials. Add the following code to the end of your script: numd = numd(2:3); dend = dend(1:3); motor_d = tf(numd,dend,ts) When you run the script, you will find that the discrete transfer function is: 58

61 θ(z) 0.001z = V(Z) z^ z We would like to see what the closed-loop response of the system looks like when no controller is added. First, we have to close the loop of the transfer function by using the feedback command. After closing the loop, let's see how the closed-loop stairstep response performs by using thestep and stairs commands. The step command will provide the vector of discrete step signals and the stairs command will connect these discrete signals. Add the following MathScript code at the end of the existing script: sys_cl = feedback(motor_d,1); [x1,t] = step(sys_cl,.5); stairs(t,x1) xlabel('time (seconds)') ylabel('position (rad)') title('stairstep Response: Original') When you run the script, you should see the following plot: Root Locus Design Figure 1: Stairstep Response: Original The main idea of root locus design is to obtain the closed-loop response from the open-loop root locus plot. By adding zeros and poles to the original system, the root locus can be modified, to get a new closed-loop response. First, let's see the root-locus for the system itself. In your script, add the following commands: rlocus(motor_d) title('root Locus of Original System') zgrid(0,0) 59

62 axis([-2,2,-2,2]) When you run your script, you should see the following plot: Figure 2: Root Locus of Original System To get the zero steady-state error from the closed-loop response, we have to add an integral control. Recall that the integral control in continuous-time is 1/s. If we use the backward difference approximation for mapping from the s- plane to the z-plane as described by s = 1/(z-1), one pole will be added at 1 on the root locus plot. After adding the extra pole at 1, the root locus will have three poles near 1. Therefore the root locus will move out to the right, and the closed-loop response will be more unstable. Thus, we must add one zero near 1, inside the unit circle, to cancel with one pole and pull the root locus in. We will add a zero at z = In general, we must at least add as many poles as zeros for the controller to be causal. Add the following MathScript code to the end of your existing script: numi = [1-0.95]; deni = [1-1]; icontr = tf(numi,deni,ts); Recall from the Digital Control Tutorial page that the zgrid on command can be used to find the desired region (satisfying the design requirements) on the discrete root locus plot. From the design requirement, the settling time is less than 0.04 seconds and the percent overshoot is less than 16%. The formulas for finding the damping ratio and natural frequency are: 60

63 where OS = the percent overshoot, and Ts = the settling time. The required damping ratio is 0.5 and the natural frequency is 200 rad/sec = 0.2 rad/sample. Add the following code to the end of your script: rlocus(icontr*motor_d); zgrid on title('root Locus of System with Integral Control') axis([-2,2,-2,2]) When you run the script, you should get the following plot: Figure 3: Root Locus of System with Integrated Control From the above root locus plot, we can see that system is unstable at all gains because the root locus is outside the unit circle. Moreover, the root locus should be in the region where the damping ratio line at 0.5 and the natural frequency line at 0.2 cross each other, to satisfy the design requirements. Thus we have to pull the root locus in further by first canceling the zero at approximately -0.98, since this zero will add overshoot to the step response. Then we have to add one more pole and two zeros near the desired poles. After going through some trial and error, one more pole is added at 0.61 and two zeros are added at Add the following code to your script: numc = conv([1-0.76],[1-0.76]); 61

64 denc = conv([ ],[1-0.61]); contr = tf(numc,denc,ts); rlocus(icontr*contr*motor_d); zgrid on title('root Locus of Compensated System') axis([-2,2,-2,2]) The system will have a pole at 0.61 instead of When you run the script, you should get the following root locus plot: Figure 4: Root Locus of Compensated System From the above root locus plot, we see that the root locus is now in the desired region. Let's find a gain, K, on the root locus plot by using the rlocfind command. Then, we can obtain the stairstep response with the selected gain. Add the following commands to the end of your script: K = rlocfind(icontr*contr*motor_d) sys_cl = feedback(k*icontr*contr*motor_d,1); [x2,t] = step(sys_cl,.05); stairs(t,x2) xlabel('time (seconds)') ylabel('position (rad)') 62

65 axis([0,0.05,0,1.4]) title('stairstep Response of Compensated System') When you run the script, you should see an Interactive Root Locus window pop up. On the plot, click on the x-axis (Real Axis) values to change the viewing window. Change the left-most x-axis value to 0.2 and the right-most value to 1.1. Next, drag one of the poles to make your plot look like this: Figure 5: Interactive Root Locus to Select Gain The selected gain should be around 330. Click OK. You should now see a plot of the closed-loop compensated response: 63

66 Figure 6: Stairstep Response of Compensated System From the above closed-loop response, the settling time is about 0.05 seconds, which satisfies the requirement, but the percent overshoot is 22%, which is too large, due to the zeros. If we select the gain to be larger, the requirements will be satisfied. On the other hand, the problem will be unrealistic, and a huge actuator will be needed. You can try this yourself by picking a larger gain on the previous root locus plot, which will yield an unrealistically sudden step response. So we have to move one pole and two zeros a little further to the right, to pull the root locus in a little bit more. The new pole will be put at 0.7, and two zeros will be at Go back to your script, and change only numc and denc, as shown below: numc = conv([1-0.85],[1-0.85]); denc = conv([ ],[1-0.7]); Again, change the Real Axis limits to 0.2 and 1.1 in the Interactive Root Locus window. Adjust the poles to make your plot look like this: 64

67 Figure 7: Interactive Root Locus to Select Gain The selected gain should be around 450. Click OK. You should now see a new plot of the closed-loop compensated response: Figure 8: Stairstep Response of Compensated System Now we see that the settling time and percent overshoot meet the design requirements of the system. The settling time is 0.04 seconds and the percent overshoot is about 10%. 65

68 Let's take a look at a disturbance response of the closed-loop system. We need to cancel the selected gain, the integral transfer function, and the controller's transfer function from the closed-loop transfer function. So add the following code to your script: dist_cl=feedback(motor_d,k*icontr*contr); [x4,t] = step(dist_cl,.25); stairs(t,x4) xlabel('time (seconds)') ylabel('position (rad)') title('stairstep Response of Compensated System') You will have to select the gain again. After that, you should see the following root locus plot: Figure 9: Disturbance Response of Closed-Loop System We can see that a response to the disturbance is small (3.3% of the disturbance) and settles within 2% of the disturbance after 0.04 seconds and eventually reaches zero. 66

69 Simulation Modeling for DC Motor Position Physical Setup A common actuator in control systems is the DC motor. It directly provides rotary motion and, coupled with wheels or drums and cables, can provide transitional motion. The electric circuit of the armature and the free body diagram of the rotor are shown in the following figure: Figure 1: DC Motor Circuit and Free Body Diagram For this example, we will assume the following values for the physical parameters. These values were derived by experiment from an actual motor in Carnegie Mellon University's undergraduate controls lab. moment of inertia of the rotor (J) = E-6 kg.m^2/s^2 damping ratio of the mechanical system (b) = E-6 Nms electromotiveforceconstant(k=ke=kt) = Nm/Amp electric resistance (R) = 4 ohm electric inductance (L) = 2.75E-6 H input (V): Source Voltage output (theta): position of shaft The rotor and shaft are assumed to be rigid System Equations The motor torque, T, is related to the armature current, i, by a constant factor Kt. The back emf, e, is related to the rotational velocity by the following equations: 67

70 In SI units (which we will use), Kt (armature constant) is equal to Ke (motor constant). Building the Model This system will be modeled by summing the torques acting on the rotor inertia and integrating the acceleration to give the velocity, and integrating velocity to get position. Also, Kirchoff's laws will be applied to the armature circuit. First, we will model the integrals of the rotational acceleration and of the rate of change of armature current. To model these integrals, begin with a blank VI. Create a Simulation Loop, from the Simulation section of the Control Design & Simulation palette. Insert three Integrator blocks (from the Linear Systems section of the Simulation palette) into your model. To create labels, double-click on empty space in your block diagram. Figure 2: Integrator Blocks Next, we will start to model both Newton's law and Kirchoff's law. These laws applied to the motor system give the following equations: 68

71 The angular acceleration is equal to 1/J multiplied by the sum of two terms (one positive, one negative). Similarly, the derivative of current is equal to 1/L multiplied by the sum of three terms (one positive, two negative). To model this, drag two Summation blocks (from the Signal Arithmetic section of the Simulation palette) into the Simulation Loop. Adjust the inputs on each Sum block to represent the signs of the terms in parentheses above. Drag two Gain blocks into your model (from the Signal Arithmetic section of the Simulation palette). The outputs of each of these Summation blocks will need to be multiplied by the inverses of J and L. We will be entering these values externally. Double-click on each Gain block, and change the Parameter Source from Configuration Dialog Box to Terminal. Attach each one with a wire to the outputs of the Summation blocks. Connect the outputs of the Gain blocks to the inputs of two of the Integrator blocks. Figure 3: Summation and Gain Blocks The Gain blocks should have values of 1/J and 1/L. From the Front Panel, create two Numeric Controls. Title them "J" and "L". On the Block Diagram, insert the Reciprocal block (from the Numeric section of the Programming palette). Connect J and L to separate Reciprocal blocks, and then connect the output of these Reciprocal blocks to the Gain blocks in the Simulation Loop. Figure 4: Inductance and Inertia 69

72 Next, we need to model the terms from the angular acceleration equation. Recall that Kt (armature constant) is equal to Ke (motor constant). For this reason, we can create a single variable to use for both of these values. Create a Numeric Control on the Front Panel, and title it "K". For the Kt term, create a Gain block and place it to the left of the lower Summation block in the Simulation Loop. Label this block "Kt". Configure it so that its source is from a terminal. Connect the i output from the upper Integrator block to the input of the Gain block that you just created. Then connect K to the gain terminal of the Gain block. To account for damping, create another Numeric Control, and name it "b". Create another Gain block, configure it so that its source is from a terminal, and then connect b to this terminal. Reverse the block (right-click on the block and select "Reverse Terminals"), and then connect theta to its input. Wire the output of the damping block to the negative terminal of the lower Summation block. We have now modeled the inertia equation. Figure 5: Angular Acceleration Equation For the armature current equation, we need to model Ke and R (resistance). Create a Gain block, and configure it so that its source is from a Terminal. Connect K to this terminal, and label the block "Ke". Tap off the d(theta)/dt wire, and connect it to the Ke input. Connect the Ke output to a negative terminal of the upper Summation block. To account for resistance, create another Numeric Control, and name it "R". Create another Gain block, configure it so that its source is from a terminal, and then connect R to this terminal. Reverse the block, and then connect i to its input. Connect the output of this block to the remaining negative terminal on the upper Summation block. 70

73 Figure 6: Armature Current Equation Now we need to model the source voltage, V, for the system. Insert a Step Signal block from the Signal Generation section of the Simulation palette, and connect it to the positive input of the upper Summation block. Figure 7: Step Signal 71

74 Double-click on the Step Signal block to configure its settings. Set the initial value to 0, the final value to 1, and the step time to Figure 8: Step Signal Configuration Now, set the values for the Numeric Controls on the Front Panel. When you are finished, save these values by clicking the Edit menu and selecting "Make Current Values Default." Figure 9: Front Panel Controls On the Block Diagram, insert a SimTime Waveform block from the Graph Utilities section of the Simulation palette, and connect it to the theta output. 72

75 Figure 10: Waveform Chart (Download VI) Open-Loop Response To simulate this system, an appropriate simulation time must be set. Double-click on the terminals located on the left side of the Simulation Loop. In the Simulation Timing section at the top of the dialog box, set the initial time to 0 seconds and the final time to 0.3 seconds. 0.3 seconds is long enough to view the open-loop response. For the ODE solver, select 'Runge-Kutta 45'. Close the dialog box. 73

76 Figure 11: Configure Simulation Parameters Now, switch to the front panel. Right-click on the x-axis of the Waveform Graph, and de-select Auto-Scale X. Double-click on the maximum value of the x-axis (default is 10), and change it to 1. Next, right-click on the y-axis of the Waveform Graph, and de-select Auto-Scale Y. Double-click on the maximum value of the y-axis (default is 1), and change it to 10. When you run the simulation, you should see the following output: Implementing Digital Control Figure 12: Open-Loop Response (Download VI) In the Motor Position Digital Control example, a digital controller was designed with the following transfer function: 74

77 Starting with the VI that you used for the open-loop response, select all the blocks in your Simulation loop except for the Step Signal block, the Waveform output block, and the Waveform Chart indicator. With these blocks selected, click "Edit" and select "Create Simulation Subsystem". Next, insert two Discrete Zero-Order Hold blocks (from the Discrete Linear Systems section of the Simulation palette). Place one just after the Step Signal input, and the other just before the SimTime Waveform output. Figure 13: Zero-Order Hold Next, insert a Summation block and a Discrete Transfer Function block (from the Discrete Linear Systems section of the Simulation palette). Connect the Summation block and the Transfer Function block in series with the first Zero- Order Hold block. Figure 14: Discrete Transfer Function Double-click on the Discrete Transfer Function block and change the Transfer Function Parameter source to "Terminal". Change the Execution Mode to "Direct". 75

78 Figure 15: Discrete Transfer Function Configuration Create a MathScript Node outside the Simulation Loop, and paste the following code into the Node: num = 450*conv([1 -.85],[1 -.85]); den = conv([1.98],[1 -.7]); sys = tf(num,den,0.001); Create an output from the Node for the sys variable, and change its data type to "TF object". Connect this transfer function to the Transfer Function terminal of the Discrete Transfer Function block. Figure 16: Create Transfer Function 76

79 Now, connect the Step Signal block to the positive input of the Summation block. Tap off the output from the second Zero-Order Hold block, and connect that to the negative input of the Summation block. Closed-Loop Response Figure 17: Step Signal Connection (Download VI Subsystem) To simulate this system, an appropriate simulation time must be set. Double-click on the terminals located on the left side of the Simulation Loop. The design requirements included a settling time of less than 0.04 sec, so we simulate for 0.06 sec to view the output. In the Simulation Timing section at the top of the dialog box, set the initial time to 0 seconds, the final time to 0.06 seconds, and the ODE solver to Runge-Kutta 23. Close the dialog box. 77

80 Figure 18: Configure Simulation Parameters On the front panel, change the window axis values on the Waveform Graph. Change the maximum y-axis value to 1.5 and the maximum x-axis value to Now run the VI. You should see the following output: Figure 19: Closed-Loop Response (Download VI Subsystem) 78

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

Example: Modeling DC Motor Position Physical Setup System Equations Design Requirements MATLAB Representation and Open-Loop Response Page 1 of 5 Example: Modeling DC Motor Position Physical Setup System Equations Design Requirements MATLAB Representation and Open-Loop Response Physical Setup A common actuator in control systems is the

More information

Example: DC Motor Speed Modeling

Example: DC Motor Speed Modeling Page 1 of 5 Example: DC Motor Speed Modeling Physical setup and system equations Design requirements MATLAB representation and open-loop response Physical setup and system equations A common actuator in

More information

DC Motor Position: System Modeling

DC Motor Position: System Modeling 1 of 7 01/03/2014 22:07 Tips Effects TIPS ABOUT BASICS INDEX NEXT INTRODUCTION CRUISE CONTROL MOTOR SPEED MOTOR POSITION SUSPENSION INVERTED PENDULUM SYSTEM MODELING ANALYSIS DC Motor Position: System

More information

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

Bangladesh University of Engineering and Technology. EEE 402: Control System I Laboratory Bangladesh University of Engineering and Technology Electrical and Electronic Engineering Department EEE 402: Control System I Laboratory Experiment No. 4 a) Effect of input waveform, loop gain, and system

More information

System Modeling: Motor position, θ The physical parameters for the dc motor are:

System Modeling: Motor position, θ The physical parameters for the dc motor are: Dept. of EEE, KUET, Sessional on EE 3202: Expt. # 2 2k15 Batch Experiment No. 02 Name of the experiment: Modeling of Physical systems and study of their closed loop response Objective: (i) (ii) (iii) (iv)

More information

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

SRV02-Series Rotary Experiment # 1. Position Control. Student Handout SRV02-Series Rotary Experiment # 1 Position Control Student Handout SRV02-Series Rotary Experiment # 1 Position Control Student Handout 1. Objectives The objective in this experiment is to introduce the

More information

FEEDBACK CONTROL SYSTEMS

FEEDBACK CONTROL SYSTEMS FEEDBAC CONTROL SYSTEMS. Control System Design. Open and Closed-Loop Control Systems 3. Why Closed-Loop Control? 4. Case Study --- Speed Control of a DC Motor 5. Steady-State Errors in Unity Feedback Control

More information

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

Quanser NI-ELVIS Trainer (QNET) Series: QNET Experiment #02: DC Motor Position Control. DC Motor Control Trainer (DCMCT) Student Manual Quanser NI-ELVIS Trainer (QNET) Series: QNET Experiment #02: DC Motor Position Control DC Motor Control Trainer (DCMCT) Student Manual Table of Contents 1 Laboratory Objectives1 2 References1 3 DCMCT Plant

More information

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) =

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) = 567 This is often referred to as Þnite settling time or deadbeat design because the dynamics will settle in a Þnite number of sample periods. This estimator always drives the error to zero in time 2T or

More information

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

R a) Compare open loop and closed loop control systems. b) Clearly bring out, from basics, Force-current and Force-Voltage analogies. SET - 1 II B. Tech II Semester Supplementary Examinations Dec 01 1. a) Compare open loop and closed loop control systems. b) Clearly bring out, from basics, Force-current and Force-Voltage analogies..

More information

EE 422G - Signals and Systems Laboratory

EE 422G - Signals and Systems Laboratory EE 4G - Signals and Systems Laboratory Lab 9 PID Control Kevin D. Donohue Department of Electrical and Computer Engineering University of Kentucky Lexington, KY 40506 April, 04 Objectives: Identify the

More information

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

(b) A unity feedback system is characterized by the transfer function. Design a suitable compensator to meet the following specifications: 1. (a) The open loop transfer function of a unity feedback control system is given by G(S) = K/S(1+0.1S)(1+S) (i) Determine the value of K so that the resonance peak M r of the system is equal to 1.4.

More information

Mechatronics Engineering. Li Wen

Mechatronics Engineering. Li Wen Mechatronics Engineering Li Wen Bio-inspired robot-dc motor drive Unstable system Mirko Kovac,EPFL Modeling and simulation of the control system Problems 1. Why we establish mathematical model of the control

More information

EEL2216 Control Theory CT1: PID Controller Design

EEL2216 Control Theory CT1: PID Controller Design EEL6 Control Theory CT: PID Controller Design. Objectives (i) To design proportional-integral-derivative (PID) controller for closed loop control. (ii) To evaluate the performance of different controllers

More information

1 (20 pts) Nyquist Exercise

1 (20 pts) Nyquist Exercise EE C128 / ME134 Problem Set 6 Solution Fall 2011 1 (20 pts) Nyquist Exercise Consider a close loop system with unity feedback. For each G(s), hand sketch the Nyquist diagram, determine Z = P N, algebraically

More information

King Saud University

King Saud University motor speed (rad/sec) Closed Loop Step Response ing Saud University College of Engineering, Electrical Engineering Department Labwork Manual EE 356 Control and Instrumentation Laboratory (كهر 356 معمل

More information

SAMPLE SOLUTION TO EXAM in MAS501 Control Systems 2 Autumn 2015

SAMPLE SOLUTION TO EXAM in MAS501 Control Systems 2 Autumn 2015 FACULTY OF ENGINEERING AND SCIENCE SAMPLE SOLUTION TO EXAM in MAS501 Control Systems 2 Autumn 2015 Lecturer: Michael Ruderman Problem 1: Frequency-domain analysis and control design (15 pt) Given is a

More information

Positioning Servo Design Example

Positioning Servo Design Example Positioning Servo Design Example 1 Goal. The goal in this design example is to design a control system that will be used in a pick-and-place robot to move the link of a robot between two positions. Usually

More information

MAS107 Control Theory Exam Solutions 2008

MAS107 Control Theory Exam Solutions 2008 MAS07 CONTROL THEORY. HOVLAND: EXAM SOLUTION 2008 MAS07 Control Theory Exam Solutions 2008 Geir Hovland, Mechatronics Group, Grimstad, Norway June 30, 2008 C. Repeat question B, but plot the phase curve

More information

Inverted Pendulum: State-Space Methods for Controller Design

Inverted Pendulum: State-Space Methods for Controller Design 1 de 12 18/10/2015 22:45 Tips Effects TIPS ABOUT BASICS HARDWARE INDEX NEXT INTRODUCTION CRUISE CONTROL MOTOR SPEED MOTOR POSITION SYSTEM MODELING ANALYSIS Inverted Pendulum: State-Space Methods for Controller

More information

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK SUB.NAME : CONTROL SYSTEMS BRANCH : ECE YEAR : II SEMESTER: IV 1. What is control system? 2. Define open

More information

Introduction to Feedback Control

Introduction to Feedback Control Introduction to Feedback Control Control System Design Why Control? Open-Loop vs Closed-Loop (Feedback) Why Use Feedback Control? Closed-Loop Control System Structure Elements of a Feedback Control System

More information

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

R10 JNTUWORLD B 1 M 1 K 2 M 2. f(t) Figure 1 Code No: R06 R0 SET - II B. Tech II Semester Regular Examinations April/May 03 CONTROL SYSTEMS (Com. to EEE, ECE, EIE, ECC, AE) Time: 3 hours Max. Marks: 75 Answer any FIVE Questions All Questions carry

More information

3 Lab 3: DC Motor Transfer Function Estimation by Explicit Measurement

3 Lab 3: DC Motor Transfer Function Estimation by Explicit Measurement 3 Lab 3: DC Motor Transfer Function Estimation by Explicit Measurement 3.1 Introduction There are two common methods for determining a plant s transfer function. They are: 1. Measure all the physical parameters

More information

Classify a transfer function to see which order or ramp it can follow and with which expected error.

Classify a transfer function to see which order or ramp it can follow and with which expected error. Dr. J. Tani, Prof. Dr. E. Frazzoli 5-059-00 Control Systems I (Autumn 208) Exercise Set 0 Topic: Specifications for Feedback Systems Discussion: 30.. 208 Learning objectives: The student can grizzi@ethz.ch,

More information

ME 3210 Mechatronics II Laboratory Lab 4: DC Motor Characteristics

ME 3210 Mechatronics II Laboratory Lab 4: DC Motor Characteristics ME 3210 Mechatronics II Laboratory Lab 4: DC Motor Characteristics Introduction Often, due to budget constraints or convenience, engineers must use whatever tools are available to create new or improved

More information

Lab 3: Model based Position Control of a Cart

Lab 3: Model based Position Control of a Cart I. Objective Lab 3: Model based Position Control of a Cart The goal of this lab is to help understand the methodology to design a controller using the given plant dynamics. Specifically, we would do position

More information

6.1 Sketch the z-domain root locus and find the critical gain for the following systems K., the closed-loop characteristic equation is K + z 0.

6.1 Sketch the z-domain root locus and find the critical gain for the following systems K., the closed-loop characteristic equation is K + z 0. 6. Sketch the z-domain root locus and find the critical gain for the following systems K (i) Gz () z 4. (ii) Gz K () ( z+ 9. )( z 9. ) (iii) Gz () Kz ( z. )( z ) (iv) Gz () Kz ( + 9. ) ( z. )( z 8. ) (i)

More information

LABORATORY INSTRUCTION MANUAL CONTROL SYSTEM II LAB EE 693

LABORATORY INSTRUCTION MANUAL CONTROL SYSTEM II LAB EE 693 LABORATORY INSTRUCTION MANUAL CONTROL SYSTEM II LAB EE 693 ELECTRICAL ENGINEERING DEPARTMENT JIS COLLEGE OF ENGINEERING (AN AUTONOMOUS INSTITUTE) KALYANI, NADIA EXPERIMENT NO : CS II/ TITLE : FAMILIARIZATION

More information

The basic principle to be used in mechanical systems to derive a mathematical model is Newton s law,

The basic principle to be used in mechanical systems to derive a mathematical model is Newton s law, Chapter. DYNAMIC MODELING Understanding the nature of the process to be controlled is a central issue for a control engineer. Thus the engineer must construct a model of the process with whatever information

More information

Implementation Issues for the Virtual Spring

Implementation Issues for the Virtual Spring Implementation Issues for the Virtual Spring J. S. Freudenberg EECS 461 Embedded Control Systems 1 Introduction One of the tasks in Lab 4 is to attach the haptic wheel to a virtual reference position with

More information

Pitch Rate CAS Design Project

Pitch Rate CAS Design Project Pitch Rate CAS Design Project Washington University in St. Louis MAE 433 Control Systems Bob Rowe 4.4.7 Design Project Part 2 This is the second part of an ongoing project to design a control and stability

More information

QNET DC Motor Control

QNET DC Motor Control QNET DC Motor Control Workbook QNET DCMCT Student Version Quanser Inc. 2011 c 2011 Quanser Inc., All rights reserved. Quanser Inc. 119 Spy Court Markham, Ontario L3R 5H6 Canada info@quanser.com Phone:

More information

Appendix A: Exercise Problems on Classical Feedback Control Theory (Chaps. 1 and 2)

Appendix A: Exercise Problems on Classical Feedback Control Theory (Chaps. 1 and 2) Appendix A: Exercise Problems on Classical Feedback Control Theory (Chaps. 1 and 2) For all calculations in this book, you can use the MathCad software or any other mathematical software that you are familiar

More information

CHAPTER 7 : BODE PLOTS AND GAIN ADJUSTMENTS COMPENSATION

CHAPTER 7 : BODE PLOTS AND GAIN ADJUSTMENTS COMPENSATION CHAPTER 7 : BODE PLOTS AND GAIN ADJUSTMENTS COMPENSATION Objectives Students should be able to: Draw the bode plots for first order and second order system. Determine the stability through the bode plots.

More information

Computer Aided Control Design

Computer Aided Control Design Computer Aided Control Design Project-Lab 3 Automatic Control Basic Course, EL1000/EL1100/EL1120 Revised August 18, 2008 Modified version of laboration developed by Håkan Fortell and Svante Gunnarsson

More information

Digital Control Systems

Digital Control Systems Digital Control Systems Lecture Summary #4 This summary discussed some graphical methods their use to determine the stability the stability margins of closed loop systems. A. Nyquist criterion Nyquist

More information

DIGITAL CONTROL OF POWER CONVERTERS. 3 Digital controller design

DIGITAL CONTROL OF POWER CONVERTERS. 3 Digital controller design DIGITAL CONTROL OF POWER CONVERTERS 3 Digital controller design Frequency response of discrete systems H(z) Properties: z e j T s 1 DC Gain z=1 H(1)=DC 2 Periodic nature j Ts z e jt e s cos( jt ) j sin(

More information

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

sc Control Systems Design Q.1, Sem.1, Ac. Yr. 2010/11 sc46 - Control Systems Design Q Sem Ac Yr / Mock Exam originally given November 5 9 Notes: Please be reminded that only an A4 paper with formulas may be used during the exam no other material is to be

More information

CYBER EXPLORATION LABORATORY EXPERIMENTS

CYBER EXPLORATION LABORATORY EXPERIMENTS CYBER EXPLORATION LABORATORY EXPERIMENTS 1 2 Cyber Exploration oratory Experiments Chapter 2 Experiment 1 Objectives To learn to use MATLAB to: (1) generate polynomial, (2) manipulate polynomials, (3)

More information

Table of Laplacetransform

Table of Laplacetransform Appendix Table of Laplacetransform pairs 1(t) f(s) oct), unit impulse at t = 0 a, a constant or step of magnitude a at t = 0 a s t, a ramp function e- at, an exponential function s + a sin wt, a sine fun

More information

PID Control. Objectives

PID Control. Objectives PID Control Objectives The objective of this lab is to study basic design issues for proportional-integral-derivative control laws. Emphasis is placed on transient responses and steady-state errors. The

More information

Application Note #3413

Application Note #3413 Application Note #3413 Manual Tuning Methods Tuning the controller seems to be a difficult task to some users; however, after getting familiar with the theories and tricks behind it, one might find the

More information

Course Summary. The course cannot be summarized in one lecture.

Course Summary. The course cannot be summarized in one lecture. Course Summary Unit 1: Introduction Unit 2: Modeling in the Frequency Domain Unit 3: Time Response Unit 4: Block Diagram Reduction Unit 5: Stability Unit 6: Steady-State Error Unit 7: Root Locus Techniques

More information

Introduction to Controls

Introduction to Controls EE 474 Review Exam 1 Name Answer each of the questions. Show your work. Note were essay-type answers are requested. Answer with complete sentences. Incomplete sentences will count heavily against the grade.

More information

Laboratory Exercise 1 DC servo

Laboratory Exercise 1 DC servo Laboratory Exercise DC servo Per-Olof Källén ø 0,8 POWER SAT. OVL.RESET POS.RESET Moment Reference ø 0,5 ø 0,5 ø 0,5 ø 0,65 ø 0,65 Int ø 0,8 ø 0,8 Σ k Js + d ø 0,8 s ø 0 8 Off Off ø 0,8 Ext. Int. + x0,

More information

School of Mechanical Engineering Purdue University. ME375 ElectroMechanical - 1

School of Mechanical Engineering Purdue University. ME375 ElectroMechanical - 1 Electro-Mechanical Systems DC Motors Principles of Operation Modeling (Derivation of fg Governing Equations (EOM)) Block Diagram Representations Using Block Diagrams to Represent Equations in s - Domain

More information

School of Mechanical Engineering Purdue University. ME375 Feedback Control - 1

School of Mechanical Engineering Purdue University. ME375 Feedback Control - 1 Introduction to Feedback Control Control System Design Why Control? Open-Loop vs Closed-Loop (Feedback) Why Use Feedback Control? Closed-Loop Control System Structure Elements of a Feedback Control System

More information

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203. DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING SUBJECT QUESTION BANK : EC6405 CONTROL SYSTEM ENGINEERING SEM / YEAR: IV / II year

More information

(a) Torsional spring-mass system. (b) Spring element.

(a) Torsional spring-mass system. (b) Spring element. m v s T s v a (a) T a (b) T a FIGURE 2.1 (a) Torsional spring-mass system. (b) Spring element. by ky Wall friction, b Mass M k y M y r(t) Force r(t) (a) (b) FIGURE 2.2 (a) Spring-mass-damper system. (b)

More information

LABORATORY INSTRUCTION MANUAL CONTROL SYSTEM I LAB EE 593

LABORATORY INSTRUCTION MANUAL CONTROL SYSTEM I LAB EE 593 LABORATORY INSTRUCTION MANUAL CONTROL SYSTEM I LAB EE 593 ELECTRICAL ENGINEERING DEPARTMENT JIS COLLEGE OF ENGINEERING (AN AUTONOMOUS INSTITUTE) KALYANI, NADIA CONTROL SYSTEM I LAB. MANUAL EE 593 EXPERIMENT

More information

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

Rotary Motion Servo Plant: SRV02. Rotary Experiment #01: Modeling. SRV02 Modeling using QuaRC. Student Manual Rotary Motion Servo Plant: SRV02 Rotary Experiment #01: Modeling SRV02 Modeling using QuaRC Student Manual SRV02 Modeling Laboratory Student Manual Table of Contents 1. INTRODUCTION...1 2. PREREQUISITES...1

More information

Systems Analysis and Control

Systems Analysis and Control Systems Analysis and Control Matthew M. Peet Arizona State University Lecture 24: Compensation in the Frequency Domain Overview In this Lecture, you will learn: Lead Compensators Performance Specs Altering

More information

Experiment 81 - Design of a Feedback Control System

Experiment 81 - Design of a Feedback Control System Experiment 81 - Design of a Feedback Control System 201139030 (Group 44) ELEC273 May 9, 2016 Abstract This report discussed the establishment of open-loop system using FOPDT medel which is usually used

More information

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

CHAPTER 1 Basic Concepts of Control System. CHAPTER 6 Hydraulic Control System CHAPTER 1 Basic Concepts of Control System 1. What is open loop control systems and closed loop control systems? Compare open loop control system with closed loop control system. Write down major advantages

More information

Lab 3: Quanser Hardware and Proportional Control

Lab 3: Quanser Hardware and Proportional Control Lab 3: Quanser Hardware and Proportional Control The worst wheel of the cart makes the most noise. Benjamin Franklin 1 Objectives The goal of this lab is to: 1. familiarize you with Quanser s QuaRC tools

More information

ENGG4420 LECTURE 7. CHAPTER 1 BY RADU MURESAN Page 1. September :29 PM

ENGG4420 LECTURE 7. CHAPTER 1 BY RADU MURESAN Page 1. September :29 PM CHAPTER 1 BY RADU MURESAN Page 1 ENGG4420 LECTURE 7 September 21 10 2:29 PM MODELS OF ELECTRIC CIRCUITS Electric circuits contain sources of electric voltage and current and other electronic elements such

More information

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

Index. Index. More information.  in this web service Cambridge University Press A-type elements, 4 7, 18, 31, 168, 198, 202, 219, 220, 222, 225 A-type variables. See Across variable ac current, 172, 251 ac induction motor, 251 Acceleration rotational, 30 translational, 16 Accumulator,

More information

EDEXCEL NATIONALS UNIT 5 - ELECTRICAL AND ELECTRONIC PRINCIPLES. ASSIGNMENT No. 3 - ELECTRO MAGNETIC INDUCTION

EDEXCEL NATIONALS UNIT 5 - ELECTRICAL AND ELECTRONIC PRINCIPLES. ASSIGNMENT No. 3 - ELECTRO MAGNETIC INDUCTION EDEXCEL NATIONALS UNIT 5 - ELECTRICAL AND ELECTRONIC PRINCIPLES ASSIGNMENT No. 3 - ELECTRO MAGNETIC INDUCTION NAME: I agree to the assessment as contained in this assignment. I confirm that the work submitted

More information

Power System Operations and Control Prof. S.N. Singh Department of Electrical Engineering Indian Institute of Technology, Kanpur. Module 3 Lecture 8

Power System Operations and Control Prof. S.N. Singh Department of Electrical Engineering Indian Institute of Technology, Kanpur. Module 3 Lecture 8 Power System Operations and Control Prof. S.N. Singh Department of Electrical Engineering Indian Institute of Technology, Kanpur Module 3 Lecture 8 Welcome to lecture number 8 of module 3. In the previous

More information

Chapter 2. Classical Control System Design. Dutch Institute of Systems and Control

Chapter 2. Classical Control System Design. Dutch Institute of Systems and Control Chapter 2 Classical Control System Design Overview Ch. 2. 2. Classical control system design Introduction Introduction Steady-state Steady-state errors errors Type Type k k systems systems Integral Integral

More information

Massachusetts Institute of Technology Department of Mechanical Engineering Dynamics and Control II Design Project

Massachusetts Institute of Technology Department of Mechanical Engineering Dynamics and Control II Design Project Massachusetts Institute of Technology Department of Mechanical Engineering.4 Dynamics and Control II Design Project ACTIVE DAMPING OF TALL BUILDING VIBRATIONS: CONTINUED Franz Hover, 5 November 7 Review

More information

EC CONTROL SYSTEM UNIT I- CONTROL SYSTEM MODELING

EC CONTROL SYSTEM UNIT I- CONTROL SYSTEM MODELING EC 2255 - CONTROL SYSTEM UNIT I- CONTROL SYSTEM MODELING 1. What is meant by a system? It is an arrangement of physical components related in such a manner as to form an entire unit. 2. List the two types

More information

Laboratory 11 Control Systems Laboratory ECE3557. State Feedback Controller for Position Control of a Flexible Joint

Laboratory 11 Control Systems Laboratory ECE3557. State Feedback Controller for Position Control of a Flexible Joint Laboratory 11 State Feedback Controller for Position Control of a Flexible Joint 11.1 Objective The objective of this laboratory is to design a full state feedback controller for endpoint position control

More information

AMME3500: System Dynamics & Control

AMME3500: System Dynamics & Control Stefan B. Williams May, 211 AMME35: System Dynamics & Control Assignment 4 Note: This assignment contributes 15% towards your final mark. This assignment is due at 4pm on Monday, May 3 th during Week 13

More information

Outline. Classical Control. Lecture 5

Outline. Classical Control. Lecture 5 Outline Outline Outline 1 What is 2 Outline What is Why use? Sketching a 1 What is Why use? Sketching a 2 Gain Controller Lead Compensation Lag Compensation What is Properties of a General System Why use?

More information

Control Systems. University Questions

Control Systems. University Questions University Questions UNIT-1 1. Distinguish between open loop and closed loop control system. Describe two examples for each. (10 Marks), Jan 2009, June 12, Dec 11,July 08, July 2009, Dec 2010 2. Write

More information

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 Electrical and Electronics Engineering TUTORIAL QUESTION BAN Course Name : CONTROL SYSTEMS Course Code : A502 Class : III

More information

Dr Ian R. Manchester Dr Ian R. Manchester AMME 3500 : Root Locus

Dr Ian R. Manchester Dr Ian R. Manchester AMME 3500 : Root Locus Week Content Notes 1 Introduction 2 Frequency Domain Modelling 3 Transient Performance and the s-plane 4 Block Diagrams 5 Feedback System Characteristics Assign 1 Due 6 Root Locus 7 Root Locus 2 Assign

More information

Answers for Homework #6 for CST P

Answers for Homework #6 for CST P Answers for Homework #6 for CST 407 02P Assigned 5/10/07, Due 5/17/07 Constructing Evans root locus diagrams in Scilab Root Locus It is easy to construct a root locus of a transfer function in Scilab.

More information

Control Systems Engineering ( Chapter 8. Root Locus Techniques ) Prof. Kwang-Chun Ho Tel: Fax:

Control Systems Engineering ( Chapter 8. Root Locus Techniques ) Prof. Kwang-Chun Ho Tel: Fax: Control Systems Engineering ( Chapter 8. Root Locus Techniques ) Prof. Kwang-Chun Ho kwangho@hansung.ac.kr Tel: 02-760-4253 Fax:02-760-4435 Introduction In this lesson, you will learn the following : The

More information

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) IN BIOMEDICAL ENGINEERING SEMESTER 1 EXAMINATION 2017/2018 ADVANCED BIOMECHATRONIC SYSTEMS

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) IN BIOMEDICAL ENGINEERING SEMESTER 1 EXAMINATION 2017/2018 ADVANCED BIOMECHATRONIC SYSTEMS ENG0016 UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) IN BIOMEDICAL ENGINEERING SEMESTER 1 EXAMINATION 2017/2018 ADVANCED BIOMECHATRONIC SYSTEMS MODULE NO: BME6003 Date: Friday 19 January 2018

More information

FATIMA MICHAEL COLLEGE OF ENGINEERING & TECHNOLOGY

FATIMA MICHAEL COLLEGE OF ENGINEERING & TECHNOLOGY FATIMA MICHAEL COLLEGE OF ENGINEERING & TECHNOLOGY Senkottai Village, Madurai Sivagangai Main Road, Madurai - 625 020. An ISO 9001:2008 Certified Institution DEPARTMENT OF ELECTRONICS AND COMMUNICATION

More information

Engraving Machine Example

Engraving Machine Example Engraving Machine Example MCE44 - Fall 8 Dr. Richter November 24, 28 Basic Design The X-axis of the engraving machine has the transfer function G(s) = s(s + )(s + 2) In this basic example, we use a proportional

More information

Department of Electrical and Computer Engineering. EE461: Digital Control - Lab Manual

Department of Electrical and Computer Engineering. EE461: Digital Control - Lab Manual Department of Electrical and Computer Engineering EE461: Digital Control - Lab Manual Winter 2011 EE 461 Experiment #1 Digital Control of DC Servomotor 1 Objectives The objective of this lab is to introduce

More information

ECE 486 Control Systems

ECE 486 Control Systems ECE 486 Control Systems Spring 208 Midterm #2 Information Issued: April 5, 208 Updated: April 8, 208 ˆ This document is an info sheet about the second exam of ECE 486, Spring 208. ˆ Please read the following

More information

Feedback Control Systems

Feedback Control Systems ME Homework #0 Feedback Control Systems Last Updated November 06 Text problem 67 (Revised Chapter 6 Homework Problems- attached) 65 Chapter 6 Homework Problems 65 Transient Response of a Second Order Model

More information

Root Locus. Motivation Sketching Root Locus Examples. School of Mechanical Engineering Purdue University. ME375 Root Locus - 1

Root Locus. Motivation Sketching Root Locus Examples. School of Mechanical Engineering Purdue University. ME375 Root Locus - 1 Root Locus Motivation Sketching Root Locus Examples ME375 Root Locus - 1 Servo Table Example DC Motor Position Control The block diagram for position control of the servo table is given by: D 0.09 Position

More information

Digital Control: Summary # 7

Digital Control: Summary # 7 Digital Control: Summary # 7 Proportional, integral and derivative control where K i is controller parameter (gain). It defines the ratio of the control change to the control error. Note that e(k) 0 u(k)

More information

EXPERIMENTALLY DETERMINING THE TRANSFER FUNCTION OF A SPRING- MASS SYSTEM

EXPERIMENTALLY DETERMINING THE TRANSFER FUNCTION OF A SPRING- MASS SYSTEM EXPERIMENTALLY DETERMINING THE TRANSFER FUNCTION OF A SPRING- MASS SYSTEM Lab 8 OBJECTIVES At the conclusion of this experiment, students should be able to: Experimentally determine the best fourth order

More information

Mechatronics Modeling and Analysis of Dynamic Systems Case-Study Exercise

Mechatronics Modeling and Analysis of Dynamic Systems Case-Study Exercise Mechatronics Modeling and Analysis of Dynamic Systems Case-Study Exercise Goal: This exercise is designed to take a real-world problem and apply the modeling and analysis concepts discussed in class. As

More information

ECE382/ME482 Spring 2005 Homework 7 Solution April 17, K(s + 0.2) s 2 (s + 2)(s + 5) G(s) =

ECE382/ME482 Spring 2005 Homework 7 Solution April 17, K(s + 0.2) s 2 (s + 2)(s + 5) G(s) = ECE382/ME482 Spring 25 Homework 7 Solution April 17, 25 1 Solution to HW7 AP9.5 We are given a system with open loop transfer function G(s) = K(s +.2) s 2 (s + 2)(s + 5) (1) and unity negative feedback.

More information

THE REACTION WHEEL PENDULUM

THE REACTION WHEEL PENDULUM THE REACTION WHEEL PENDULUM By Ana Navarro Yu-Han Sun Final Report for ECE 486, Control Systems, Fall 2013 TA: Dan Soberal 16 December 2013 Thursday 3-6pm Contents 1. Introduction... 1 1.1 Sensors (Encoders)...

More information

Proportional plus Integral (PI) Controller

Proportional plus Integral (PI) Controller Proportional plus Integral (PI) Controller 1. A pole is placed at the origin 2. This causes the system type to increase by 1 and as a result the error is reduced to zero. 3. Originally a point A is on

More information

Control of Electromechanical Systems

Control of Electromechanical Systems Control of Electromechanical Systems November 3, 27 Exercise Consider the feedback control scheme of the motor speed ω in Fig., where the torque actuation includes a time constant τ A =. s and a disturbance

More information

Video 5.1 Vijay Kumar and Ani Hsieh

Video 5.1 Vijay Kumar and Ani Hsieh Video 5.1 Vijay Kumar and Ani Hsieh Robo3x-1.1 1 The Purpose of Control Input/Stimulus/ Disturbance System or Plant Output/ Response Understand the Black Box Evaluate the Performance Change the Behavior

More information

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

Rotary Motion Servo Plant: SRV02. Rotary Experiment #11: 1-DOF Torsion. 1-DOF Torsion Position Control using QuaRC. Student Manual Rotary Motion Servo Plant: SRV02 Rotary Experiment #11: 1-DOF Torsion 1-DOF Torsion Position Control using QuaRC Student Manual Table of Contents 1. INTRODUCTION...1 2. PREREQUISITES...1 3. OVERVIEW OF

More information

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

EE C128 / ME C134 Fall 2014 HW 6.2 Solutions. HW 6.2 Solutions EE C28 / ME C34 Fall 24 HW 6.2 Solutions. PI Controller For the system G = K (s+)(s+3)(s+8) HW 6.2 Solutions in negative feedback operating at a damping ratio of., we are going to design a PI controller

More information

ECE 320 Linear Control Systems Winter Lab 1 Time Domain Analysis of a 1DOF Rectilinear System

ECE 320 Linear Control Systems Winter Lab 1 Time Domain Analysis of a 1DOF Rectilinear System Amplitude ECE 3 Linear Control Systems Winter - Lab Time Domain Analysis of a DOF Rectilinear System Objective: Become familiar with the ECP control system and MATLAB interface Collect experimental data

More information

Lecture 12. Upcoming labs: Final Exam on 12/21/2015 (Monday)10:30-12:30

Lecture 12. Upcoming labs: Final Exam on 12/21/2015 (Monday)10:30-12:30 289 Upcoming labs: Lecture 12 Lab 20: Internal model control (finish up) Lab 22: Force or Torque control experiments [Integrative] (2-3 sessions) Final Exam on 12/21/2015 (Monday)10:30-12:30 Today: Recap

More information

CONTROL SYSTEMS ENGINEERING Sixth Edition International Student Version

CONTROL SYSTEMS ENGINEERING Sixth Edition International Student Version CONTROL SYSTEMS ENGINEERING Sixth Edition International Student Version Norman S. Nise California State Polytechnic University, Pomona John Wiley fir Sons, Inc. Contents PREFACE, vii 1. INTRODUCTION, 1

More information

(Refer Slide Time: 2:11)

(Refer Slide Time: 2:11) Control Engineering Prof. Madan Gopal Department of Electrical Engineering Indian institute of Technology, Delhi Lecture - 40 Feedback System Performance based on the Frequency Response (Contd.) The summary

More information

Exam. 135 minutes + 15 minutes reading time

Exam. 135 minutes + 15 minutes reading time Exam January 23, 27 Control Systems I (5-59-L) Prof. Emilio Frazzoli Exam Exam Duration: 35 minutes + 5 minutes reading time Number of Problems: 45 Number of Points: 53 Permitted aids: Important: 4 pages

More information

ELECTRONICS & COMMUNICATIONS DEP. 3rd YEAR, 2010/2011 CONTROL ENGINEERING SHEET 5 Lead-Lag Compensation Techniques

ELECTRONICS & COMMUNICATIONS DEP. 3rd YEAR, 2010/2011 CONTROL ENGINEERING SHEET 5 Lead-Lag Compensation Techniques CAIRO UNIVERSITY FACULTY OF ENGINEERING ELECTRONICS & COMMUNICATIONS DEP. 3rd YEAR, 00/0 CONTROL ENGINEERING SHEET 5 Lead-Lag Compensation Techniques [] For the following system, Design a compensator such

More information

7.4 STEP BY STEP PROCEDURE TO DRAW THE ROOT LOCUS DIAGRAM

7.4 STEP BY STEP PROCEDURE TO DRAW THE ROOT LOCUS DIAGRAM ROOT LOCUS TECHNIQUE. Values of on the root loci The value of at any point s on the root loci is determined from the following equation G( s) H( s) Product of lengths of vectors from poles of G( s)h( s)

More information

Analysis and Design of Control Systems in the Time Domain

Analysis and Design of Control Systems in the Time Domain Chapter 6 Analysis and Design of Control Systems in the Time Domain 6. Concepts of feedback control Given a system, we can classify it as an open loop or a closed loop depends on the usage of the feedback.

More information

Department of Electronics and Instrumentation Engineering M. E- CONTROL AND INSTRUMENTATION ENGINEERING CL7101 CONTROL SYSTEM DESIGN Unit I- BASICS AND ROOT-LOCUS DESIGN PART-A (2 marks) 1. What are the

More information

ECE382/ME482 Spring 2005 Homework 6 Solution April 17, (s/2 + 1) s(2s + 1)[(s/8) 2 + (s/20) + 1]

ECE382/ME482 Spring 2005 Homework 6 Solution April 17, (s/2 + 1) s(2s + 1)[(s/8) 2 + (s/20) + 1] ECE382/ME482 Spring 25 Homework 6 Solution April 17, 25 1 Solution to HW6 P8.17 We are given a system with open loop transfer function G(s) = 4(s/2 + 1) s(2s + 1)[(s/8) 2 + (s/2) + 1] (1) and unity negative

More information

Outline. Classical Control. Lecture 1

Outline. Classical Control. Lecture 1 Outline Outline Outline 1 Introduction 2 Prerequisites Block diagram for system modeling Modeling Mechanical Electrical Outline Introduction Background Basic Systems Models/Transfers functions 1 Introduction

More information

State Feedback Controller for Position Control of a Flexible Link

State Feedback Controller for Position Control of a Flexible Link Laboratory 12 Control Systems Laboratory ECE3557 Laboratory 12 State Feedback Controller for Position Control of a Flexible Link 12.1 Objective The objective of this laboratory is to design a full state

More information