The objective of this part of the DC motor experiment is to implement the controller designed in part B and evaluate its performance.
The following is a list of the required equipment to perform this experiment:
Open q_servo_pos_cntrl.slx
file. Do not change anything except the PID gains.
Double-click on the Signal Generator block and ensure that a 0.4 Hz square wave input is being applied. Note that the gain blocks outside the Signal Generator block are introduced to generate the square wave with amplitude between 0 V to 0.4 V.
Check that the sampling time is set to 0.002 s (located under “Modeling” -> “Model Settings” -> “Solver Details”).
Turn on the power amplifier.
Open the position scope.
Save your data. No need to Build again unless you change any blocks or configuration settings in the model.
Sampling Time Test: Change the sampling time to 0.04 sec. To set the sampling time, you need to go to the block diagram file, and choose “Modeling” -> “Model Settings” -> “Solver Details”. Set the fixed step to 0.04 sec (it should have been 0.002 previously). Build, connect and Run PD Controller, observe the behaviour and save the data with an appropriate filename (e.g. - PD_sampling_0.04).
Double-click on the Signal Generator and set the following parameters to generate a triangular wave (i.e. ramp reference):
Signal Type = triangle
Amplitude = 1
Frequency = 0.4 Hz
Change the sampling time back to 0.002 sec (“Modeling” -> “Model Settings” -> “Solver Details”).
Note: Some results require simulation response. This would require running a simulation using your SIMULINK model from Part C Control Design using the model validation K and tau values. The command input will be identical to either the square wave signal or triangle signal implemented during the experiment. The attributes of the simulation will be mentioned in the corresponding section.
Any simulation results in this subsection will have the following attributes:
Command input: Square wave
Amplitude: Maximum of 0.4 and minimum of 0
Frequency: 0.4 Hz
Sampling time: 0.002 s (Go to "Modeling" -> "Model Settings" -> "Solver details" -> "Fixed-step size")
What is the effect of proportional controller gain on closed-loop system behaviour?
What is the effect of derivative controller gain on closed-loop system behaviour?
Compare the PD simulation (that shows zero steady-state error) and experimental (that shows a steady-state error) results to also discuss regarding the dead zone in the DC motor and how it affects the steady-state error.
Plot angle or rotary position (commanded and experimental) and control input Vm from Step 1.11.
What is the effect of sampling time on closed-loop system behaviour?
Any simulation results in this subsection will have the following attributes:
Command input: Triangle wave
Frequency: 0.4 Hz
Sampling time: 0.002 s (Go to "Modeling" -> "Model Settings" -> "Solver details" -> "Fixed-step size")
Mention the final PID gains after tuning.
P Controller Test: To understand the behavior of a Proportional controller, implement a P controller by typing the values for to 0 and to 0 in the command window. Set as the value obtained in Step 5 of Part C Control Design.
To build the model, click down arrow on Monitor & Tune under Hardware tab and then Build for monitoring .
Press Connect button under Monitor & Tune and then press Start . Run the experiment for 5 seconds.
PD Controller Test: By introducing a derivative gain (), notice how the system characteristics change. Set and to the respective values found in Step 6 of Part C Control Design. will remain as 0. Connect and Start. Observe the behavior and save the data.
In the Simulink diagram, set the Amplitude gain block to and the Constant offset gain block to . This will generate a triangular wave with amplitude between 0 to .
PD Controller Test: This test is to determine the ramp response of the system with a PD controller. Set and to the respective values found in Step 6 of Part C Control Design. will remain as 0. Connect and Start. Observe the behavior and save the data.
PID Controller Test: In the respective controller gain blocks, change the current values of , and to the PID values found in Step 9 of Part C Control Design. Observe the behavior. Save the data only if there is no steady-state error.
PID Controller Tuning: If the PID controller test has not eliminated the steady-state error, tune the gain values (, and ) until the system ramp response has zero (or nearly zero) steady-state error. Save the data and gain values after the final tuning.
Plot angle or rotary position, i.e., commanded, experimental from Step 1.9, and simulation responses on one figure. Use the same gain value evaluated in Step 1.4 for the simulation response.
Plot angle or rotary position, i.e., commanded, experimental from Step 1.10, and simulation responses on one figure. Use the same and gain values evaluated in Step 1.10 for the simulation response.
Amplitude: Maximum of and minimum of 0
Plot angle or rotary position, i.e., commanded, experimental from Step 2.3, and simulation responses on one figure. Use the same and gain values evaluated in Step 2.4 for the simulation response.
Plot angle or rotary position, i.e., commanded, experimental from Step 2.5 (or 2.4 if applicable), and simulation responses on one figure. Use the tuned , and gain values evaluated in Step 2.6 for the simulation response.