Root Locus Design, Schemes and Mind Maps of Design

The objective of this experiment is to design a feedback control system for a motor posi- tioning system. Based on the motor model you developed in the Open ...

Typology: Schemes and Mind Maps

2022/2023

Uploaded on 03/01/2023

alpana
alpana 🇺🇸

4.9

(13)

249 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
TAK E HOM E LAB S
OKL AH OM A STATE UNIVERSITY
Root Locus Design
by Martin Hagan
revised by Trevor Eckert
1 OB JEC TIV E
The objective of this experiment is to design a feedback control system for a motor posi-
tioning system. Based on the motor model you developed in the Open Loop Step Response
experiment, you will use the root locus diagram to determine the best closed loop pole loca-
tions when using both proportional and derivative feedback. After you have simulated the
response of your feedback control systems, you will test the controller experimentally. You
will then iterate your design to find the best possible response, in terms of settling time, per-
cent overshoot and steady state error.
2 SE TUP
2.1 RE QU IR ED MAT ERI AL S
2.1.1 HA RDW AR E
All hardware from the Open Loop Step Response experiment is required for this lab. (No
additional hardware is required)
2.1.2 SO FT WAR E
All software from the Closed Loop Step Response experiment is required for this lab. (No
additional software is required)
2.1.3 PREVIOUS EXPERIMENTS
Closed Loop Step Response
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Root Locus Design and more Schemes and Mind Maps Design in PDF only on Docsity!

TAKE HOME LABS

OKLAHOMA STATE UNIVERSITY

Root Locus Design

by Martin Hagan

revised by Trevor Eckert

1 OBJECTIVE

The objective of this experiment is to design a feedback control system for a motor posi- tioning system. Based on the motor model you developed in the Open Loop Step Response experiment, you will use the root locus diagram to determine the best closed loop pole loca- tions when using both proportional and derivative feedback. After you have simulated the response of your feedback control systems, you will test the controller experimentally. You will then iterate your design to find the best possible response, in terms of settling time, per- cent overshoot and steady state error.

2 SETUP

2.1 REQUIRED MATERIALS

2.1.1 HARDWARE

  • All hardware from the Open Loop Step Response experiment is required for this lab. (No additional hardware is required)

2.1.2 SOFTWARE

  • All software from the Closed Loop Step Response experiment is required for this lab. (No additional software is required)

2.1.3 PREVIOUS EXPERIMENTS

  • Closed Loop Step Response

2.2 HARDWARE SETUP

No hardware setup is required. You should have completed the hardware setup in the Closed Loop Step Response experiment.

2.3 SOFTWARE SETUP

No software setup is required. You should have completed the software setup in the Closed Loop Step Response experiment.

3 EXPERIMENTAL PROCEDURES

3.1 EXERCISE 1: CONTROL DESIGN (PROPORTIONAL FEEDBACK)

In this exercise you will design a proportional feedback controller for the DC motor, using the root locus diagram. The controller signal u ( t ) (motor voltage) will be proportional to the difference between the reference signal r ( t ) and the motor position θ ( t ) ( y ( t )).

r ω y

u θ

K s

Km /τ m

s + 1/τ m

Figure 3.1: Block Diagram for Closed Loop Motor with Proportional Feedback

  1. Using block diagram manipulation on the block diagram in Figure 3.1, find the transfer functions G ( s ) and H ( s ) for the equivalent block diagram in Figure 3.2. Plug in the values for Km and τm that you found in the Open Loop Step Response experiment.

r

u y

K

G ( s )

H ( s )

Figure 3.2: Standard Feedback Control Block Diagram

Figure 3.3: Control System Designer Window

  1. Click the x on the Bode Editor for LoopTransfer_C window to get rid of the plot.
  2. Drag the rest of the plots to the left to make them bigger.
  3. Click the Edit Architecture button to add transfer functions to a block diagram. Once the window pops up it should give you a figure that looks like Figure 3.4. It shows the standard feedback control block diagram. For this experiment, there will be no pre- filter, so the F block will be left as 1 or < 1 x 1 zpk >. The G block is the motor transfer function, and the H block represents the measurements, which will also be 1 for the proportional feedback system we are considering in this exercise. The C block repre- sents the compensator, which will be the gain K for our proportional feedback system.

Figure 3.4: Control and Estimation Tools Manager

  1. The next step is to enter the motor transfer function into the G block of the Edit Archi- tecture Tool Manager. Double-click in the Value column of the G row, and enter g , as shown in Figure 3.4. Also, click in the Value column of the H row, and enter 1. Then click OK. The root locus diagram should now be visible in one of the windows.
  2. The step response that is shown will be for the default gain value of K = 1, since we did not change the default compensator value in the System Data window. The pole locations for this gain will be shown as small squares on the root locus plot, as shown in Figure 3.5. (Your root locus plot may look different than this figure, since you have a different motor transfer function.) You can grab the small square and move the closed loop poles. This will cause the gain K to change. (If you click on the C in the Controllers and Fixed Blocks subwindow at the upper left of the Control System Designer , the gain value will be displayed in the lower left Preview subwindow.) At the same time, the step response will change in the step response window. Save the root locus diagram for your lab notebook, and save the step response plot for a few different gain values. Discuss how these plots relate to the root locus and step response plots you made in Step 3.

Figure 3.5: Root Locus

  1. By moving the closed loop poles, and monitoring the step response, select the value of K that you believe will produce the best response in terms of smallest settling time, with minimal oscillation. Justify your choice. Save the best step response plot for your lab notebook.
  2. For the K that you selected, determine the voltage that it would produce, if the error ( ry ) is π /2. (Remember that u ( t ) = K ( r ( t ) − y ( t )).) Is this enough voltage to move the motor? Think back to the Simple DC Motor , Open Loop Step Response and Closed Loop Step Response experiments. Keep this in mind, when you analyze the experimental results later in this experiment.

3.2.2 SIMULATION PLOT FILE

  1. Open the main Matlab 2017a window and click New at the top and then click Script.
  2. Once the new Untitled m-file appears, Click Save at the top of the page. Save the file as RL_Plot.m.
  3. Copy and paste the text in Listing 1 into the Matlab file. After adding the code click Save

and then click Run.

  1. Save the figure as RL_S_1.fig into your folder for this project. Refer to this figure for the remaining steps in this section.
  2. Compare the simulation results with the plot you found in Step 15. They should be almost identical. If not, then you will need to check the gain value you found in Step

Listing 1: Code for Plotting the Closed Loop Step Response Simulated Results

%Load the Simulation data and time and store into variables RL_simResp_1 = load('RL_position_1.mat'); t = RL_simResp_1.position.Time; RL_simResp_1 = RL_simResp_1.position.Data;

%Plot the simulation data with respect to time figure; plot(t,ones(size(t))*ref, 'Color', 'r'); hold on; plot(t,RL_simResp_1, 'Color', 'k','LineWidth', 2); title('Simulated Closed Loop Step Response'); legend('Reference','Simulated', 'Location', 'southeast'); xlabel('Time (seconds)') ylabel('Theta (radians)')

3.3 EXERCISE 3: EXPERIMENTAL STEP RESPONSE (PROPORTIONAL FEEDBACK)

This section will provide the setup of the Simulink file for the Arduino.

3.3.1 SETTING UP SIMULINK FILE (ARDUINO)

  1. Open the Simulink file created in the Closed Loop Step Response experiment named CL_Step_Resp_Arduino.slx. It should look like Figure 3.

Figure 3.7: Closed Loop Simulink Model for Closed Loop Step Response Experiment

  1. Delete the Discrete Filter block and connect the line from the previous Velocity Scaling to the K2 block.
  2. Click FileSave As...RL_Step_Resp_Arduino.xls. The Arduino Simulink file for the experimental closed loop step response (proportional feedback) is now complete. See Figure 3.8 for the completed model.

Figure 3.8: Final Closed Loop Step Response Simulink Model for Arduino

3.3.2 COLLECTING EXPERIMENTAL DATA

  1. Open RL_Constants.m and click the Run button at the top of the page.
  2. Open RL_Step_Resp_Arduino.slx and click the “Deploy to Hardware" button at the top-right of the page.

Listing 2: Code for Plotting the Closed Loop Step Response Experimental Results %Load the experimental data and store into a variable RL_expResp_1 = load('RL_expResp_1.mat'); RL_expResp_1 = RL_expResp_1.WindowDat;

%Align the experimental data with the reference %and compute the root mean square error. [yplot,minrmse,~,~] = findShift2(RL_expResp_1,T(1/Ts),DT,ref); T1 = Ts*(0:(length(yplot)−1));

%Plot the experimental data hold on; plot(T1,yplot,'b','LineWidth', 2) ax = axis; text(ax(2),ax(4)−0.1,['Experimental RMSE = ' num2str(minrmse)],... 'HorizontalAlignment','right','VerticalAlignment','top'); legend('Reference','Simulated','Experimental','Location', 'southeast' );

  1. Save the figure as RL_SE_1.fig into your folder for this project. Refer to this figure for the remaining steps in this section.
  2. Compare the simulation results with the experimental results you found. Estimate the settling time, percent overshoot, and frequency of oscillation of the closed loop step response from the experimental plot. Compare with the simulated plot. Also com- pare the steady state values from each plot, discussing similarities and explaining dif- ferences. What could cause the experimental response to differ from the simulated response? Are there nonlinear effects in the motor that could change the performance?
  3. Can you adjust the gain K to improve the experimental response? The root mean square error (RMSE) between the reference and the motor angle is shown on the ex- perimental plot. How small can you make this value by changing the gain K. Go back to the earlier steps when you selected the K value. Try different closed loop pole lo- cations. Perhaps you need to accept a larger percent overshoot in order to achieve a smaller RMSE. Explain your design process.

3.4 EXERCISE 4: CONTROL DESIGN (PROPORTIONAL PLUS DERIVATIVE FEEDBACK)

In this exercise you will design a proportional plus derivative (PD) feedback controller for the DC motor, using the root locus diagram. The controller signal u ( t ) (motor voltage) will be K times r − ( k 2 ω + k 1 θ ). Since k 1 will be set equal to 1, K effectively multiplies ( rθ ) − k 2 θ ˙ = ek 2 θ ˙. The term K e is called proportional feedback, since it produces an input that

is proportional to the error. The term K k 2 θ ˙ is the derivative feedback, and has a damping effect, like viscous friction. The block diagram of the PD controller is shown in Figure 3.9.

r ω y

u (^) θ K (^) s

  • 1

Kmm s + 1/τ m k 2

Figure 3.9: Block Diagram for Closed Loop Motor with Proportional plus Derivative Feedback

  1. Using block diagram manipulation on the block diagram in Figure 3.9, find the transfer functions G ( s ) and H ( s ) for the equivalent block diagram in Figure 3.2. Plug in the values for Km and τm that you found in the Open Loop Step Response experiment. Your H transfer function should be in the form k 2 ( s + b )
  2. Let k 2 = 0.2, find the closed loop transfer function, and find the closed loop poles as a function of K. Complete Table 3.2 and hand plot the closed loop poles for each gain (on the same plot) denoting the number that corresponds to each gain next to the poles.

Table 3.2: Second Set of Gains

Number K Closed Loop Poles P.O. tp ts 1 0. 2 0. 3 1 4 2

  1. Let k 2 = 0.2, and plot the root locus diagram for this proportional plus derivative feed- back system as K is varied from 0 to ∞. Describe how the system step response would change as the gain K is increased from a very small value to a very large value. Be as specific as you can. Make sample sketches of the step response for a very small gain and for a large gain.
  2. You want to select K so that the system step response has the smallest settling time, while also maintaining less than a 5% overshoot. Where would be the best closed loop pole locations? Explain your answer carefully.
  3. If you change the value of k 2 , how is the root locus affected? Use sketches of the root locus for various values of k 2 to illustrate the effect. By adjusting both K and k 2 , how much flexibility do you have in placing the closed loop poles? Are there theoretical

steps Discussion/Question 1 G ( s ) and H ( s ) transfer functions 2 Table 3.1 and hand plot of closed loop poles 3 Plot root locus 3 System response as K is increased 3 Sketches of step response for a very small gain and large gain 4 Best pole locations and selection of K 14 Step response plots and root locus for different gains 14 Comparison with Step 3. 15 Selection of K and step response plot 16 Voltage if error is π /2. Is it enough voltage? 21 Does your response appear to rise up from zero and settle to the reference value? 44 Comparison between simulation and experimental results 44 Settling time, percent overshoot, frequency of oscillation and compare with simulation 44 Similarities and differences 44 What could cause the experimental response to differ from simulation? 44 Are there any nonlinear effects in the motor? 45 Explanation of design process for making RMSE smaller 46 G ( s ) and H ( s ) transfer functions 47 k 2 = 0.2 Table 3.2 and hand plot of closed loop poles 48 Plot root locus 48 System response as K is increased 48 Sketches of step response for a very small gain and large gain 49 Best pole locations and selection of K 50 Changing k 2. 50 Flexibility of closed loop poles 50 Theoretical and practical limits 51 Make sure you answer all the of the questions (should be similar to previous in the table) 52 Discussion on process of finding gains and final gain parameter design choice and calculations. 53 Encoder resolution 53 Connections between steady state error and encoder resolution

5 CONCLUSION/STUDENT FEEDBACK

This experiment lead you through the design process for proportional and proportional plus derivative feedback controllers. The PD controller enabled more control over the placement of closed loop poles, and allowed an improved system response.