Controls Lab: Motor Parameter Identification and Controller Gains Calculation, Lab Reports of Mechanical Engineering

The steps to collect motor parameter data using matlab and simulink, identify motor constants, and calculate controller gains. It also includes instructions for qualitative observations of a pid controller and pid optimization.

Typology: Lab Reports

Pre 2010

Uploaded on 08/05/2009

koofers-user-e0v
koofers-user-e0v 🇺🇸

5

(1)

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CONTROLS LAB
NOTE: All table and figure references are to the TA Presentation for this laboratory.
Motor Parameter Data Collection
Method 1:
1. Start Matlab and start Simulink. Use the Simulink icon or the Matlab command “simulink”.
2. From the Simulink File menu, open the special Simulink model template called “Control_Template1.mdl” as
shown on figure 1 of the lab presentation.
3. Specify an initial value for your step input voltage in the Matlab command window. (e. g. vin = 0.8)
4. Build your model by selecting RTW Build from the Simulink Tools menu.
5. Specify the data to be plotted by selecting Plot -> New -> Scope... from the WinCon Server toolbar.
6. Set the amount of data stored to 20 seconds by selecting Update -> Buffer in the Scope window.
7. Adjust the y-axis range by selecting Axis -> Fixed Range... from the Scope window menu. A reasonable
range is Ymin=0 and Ymax=20.
8. Start the run by pressing the big green Start button on the WinCon Server toolbar. Stop the run after the
motor speed reaches steady-state (use your judgement) but before the plot reaches the end of the graph. If the
plot reaches the end of the graph, the buffer is reset and you have to start over.
9. Save the data by selecting File -> Save -> Save as M-file… from in the Scope window. Give the file a
descriptive name that includes both your group name and information about the run.
10. Repeat the procedure above for 5 voltages: vin={0.8, 0.9, 1.0, 1.1, 1.2}(Step 3). NOTE: Model does not
need to be rebuilt for each run!
Non Linearity Data Collection
1. With the WinCon Server toolbar still open, set “Vin” to 0.9 in the Matlab command window and start the run.
2. Reduce “Vin” and run again. Repeat until the motor does not turn. This is the upper limit of the “Deadzone”
of the motor. Find this point to two decimal places (e.g. 0.54 V) and record the value.
3. Repeat the procedure above to find the lower limit of the “Deadzone” by starting “Vin” at -0.9 and increasing
it until the motor does not turn. Find this point to two decimal places (e.g. -0.54 V) and record the value.
Analysis:
Parameter Identification for Method 1:
Open one of the 5 data files created in Motor Parameter Data Collection Part 1 by typing the name of the file
without the “.m” extension in the command window. This will load the data from that file as a variable in the
workspace and plot the data in a new window.
2. Find the steady-state speed ss by inspection of the graph and enter this data in the appropriate place in
Table 2.
3. Use the steady-state speed ss to calculate the motor constant, Km, according to the formula
(5)
4. Calculate the characteristic speed of the motor *:
(6)
5. By inspection of the graph, determine the time constant Tm of the motor, which corresponds to the
characteristic speed and enter this data in the appropriate place in Table 2.
6. Repeat the steps above to find the constants corresponding to each step input voltage “Vin”.
Model Verification
min
s
ss
KVsst
)(lim)(
0
ssm
Tt
632.0)(
*
pf3

Partial preview of the text

Download Controls Lab: Motor Parameter Identification and Controller Gains Calculation and more Lab Reports Mechanical Engineering in PDF only on Docsity!

CONTROLS LAB

NOTE: All table and figure references are to the TA Presentation for this laboratory. Motor Parameter Data Collection Method 1:

  1. Start Matlab and start Simulink. Use the Simulink icon or the Matlab command “simulink”.
  2. From the Simulink File menu, open the special Simulink model template called “Control_Template1.mdl” as shown on figure 1 of the lab presentation.
  3. Specify an initial value for your step input voltage in the Matlab command window. ( e. g. vin = 0.8)
  4. Build your model by selecting RTW Build from the Simulink Tools menu.
  5. Specify the data to be plotted by selecting Plot -> New -> Scope... from the WinCon Server toolbar.
  6. Set the amount of data stored to 20 seconds by selecting Update -> Buffer in the Scope window.
  7. Adjust the y-axis range by selecting Axis -> Fixed Range... from the Scope window menu. A reasonable range is Ymin=0 and Ymax=20.
  8. Start the run by pressing the big green Start button on the WinCon Server toolbar. Stop the run after the motor speed reaches steady-state (use your judgement) but before the plot reaches the end of the graph. If the plot reaches the end of the graph, the buffer is reset and you have to start over.
  9. Save the data by selecting File -> Save -> Save as M-file… from in the Scope window. Give the file a descriptive name that includes both your group name and information about the run.
  10. Repeat the procedure above for 5 voltages: vin={0.8, 0.9, 1.0, 1.1, 1.2}(Step 3). NOTE: Model does not need to be rebuilt for each run! Non Linearity Data Collection
  11. With the WinCon Server toolbar still open, set “Vin” to 0.9 in the Matlab command window and start the run.
  12. Reduce “Vin” and run again. Repeat until the motor does not turn. This is the upper limit of the “Deadzone” of the motor. Find this point to two decimal places (e.g. 0.54 V) and record the value.
  13. Repeat the procedure above to find the lower limit of the “Deadzone” by starting “Vin” at -0.9 and increasing it until the motor does not turn. Find this point to two decimal places (e.g. -0.54 V) and record the value. Analysis: Parameter Identification for Method 1: Open one of the 5 data files created in Motor Parameter Data Collection Part 1 by typing the name of the file without the “.m” extension in the command window. This will load the data from that file as a variable in the workspace and plot the data in a new window.
  14. Find the steady-state speed ss by inspection of the graph and enter this data in the appropriate place in Table 2.
  15. Use the steady-state speed ss to calculate the motor constant, Km, according to the formula (5)
  16. Calculate the characteristic speed of the motor *: (6)
  17. By inspection of the graph, determine the time constant Tm of the motor, which corresponds to the characteristic speed and enter this data in the appropriate place in Table 2.
  18. Repeat the steps above to find the constants corresponding to each step input voltage “Vin”. Model Verification  ss   ( t )lim s  0 s ( s ) VinK m  ( t Tm ) 0. 632  ss
  • (^)   
  1. Create the Simulink model shown in Figure 3. Make sure to set the Save format of the To Workspace blocks to “Array”. Note that this model does not interface with the motor, so you do not need the “Control_Template1.mdl” file or any of the Quanser blocks.
  2. Enter the experimentally determined motor parameters from the experiments as “ T m” and “ K m” in the Matlab command window. Note that the time-domain and the frequency-domain (bode magnitude and phase) will yield different values of Km and Tm; explore each of the values in this exercise.
  3. Adjust the length of the simulation by choosing Simulation -> Parameters and setting the “Stop time” to correspond with the 1.0 volt step experiment you performed earlier.
  4. Run the simulation by pressing the start button or choosing Simulation -> Start.
  5. Plot the data in the Matlab command window and overlay it with the experimental data. An example is shown in Figure 4.
  6. ** Make sure that the step time parameter in the step block is set to 0. Also change the solver to Ode45 (or Ode5).
  7. From the generated plots, determine the best Km and Tm values among the ones you examined. These will be used below. Calculation of Controller Gains Values to use: See Below Find the controller gains, using the program controls_lab.m found on the website. Modify code to use the values for Tm and Km when asked, and record the controller gains in your notebook. Note that the code must be modified to meet the assigned control specs for each semester. CONTROLS SECOND PART (CONTINUED) NOTE: All table and figure references are to the TA Presentation for this laboratory. Values to Use: Discrete Pulse Generator: Amp = 15 rev Period = 40 sec Pulse = 50% Phase = 0 Constant: -4 rev n = [1,3,5] Mp = 12% ts = 2.5 sec Qualitative Observations
  8. Start Matlab and start Simulink. Use the Simulink icon or the Matlab command “simulink”.
  9. From the Simulink File menu, open the special Simulink model template called “Control_Qualitative.mdl” as shown on Figure 5.
  10. Specify an initial value for gains K p, K i, K d. Set gains for pure proportional controller. Set K p = 5, K i = 0, and K d = 0. Build your model by selecting RTW Build from the Simulink Tools menu. Run the controller and try to turn the motor shaft/flywheel with your hand in three ways: (1) quickly, (2) slowly, and (3) turn and hold in position. What aspect is the restoring force sensitive to? Record your observations in your lab notebook.
  11. Set K p = 0, K d = 5, and K i = 0. Run the controller and try to turn the motor shaft/flywheel with your hand in three ways: (1) quickly, (2) slowly, and (3) turn and hold in position. What aspect is restoring force sensitive to? Record your observations in your lab notebook.