Reference no: EM132454874
Open loop and closed loop speed control of a DC motor using the Arduino microcontroller and Lab view.
Introduction
The aim of this assignment is to investigate open loop and closed loop speed control of a small DC motor. For this course six lab sessions of two hours are available. Throughout these sessions we will be using the motor rig, built by you, the Arduino Nano microcontroller and Labview. The assessment will be report based on the data and knowledge that you acquire over this period. Remember, the lab sessions are not a race to finish first. Take your time to understand the system and make sure you take notes and save your results as you go.
The length or the final report should be no more than 7 sides of A4 and should include the following sections: abstract. introduction, theory, results conclusion and references.
Learning Outcomes:
- Understanding of open loop control systems and how to extract the transfer function of a system by experimentation.
- Understand the limitations of open loop control systems through investigation and reference to the course notes.
- Understand the benefits of using closed loop control.
- Understand the limitations of closed loop control.
- Understand how to optimise the response of the system using PID control.
- Understand what each component of the PID controller contributes to the response of the system.
- Be able to tune the PID controller using Nichols Ziegler tuning methods.
- Be able to relate the theory to the practice by investigation (steady state error, disturbance rejection etc).
- Be able to use simulation tools in order to simulate the response of the system and design off-line control strategies.
- Have a working knowledge of Labview and the Arduino programming environment.
Open Loop Tests
Test 1: Set the set point to 1 Volt (do not press enter). Click on the record button. The motor will respond by speeding up to around 6500 RPM. Stop the recording after a few seconds and stop Labview. Open the log file C:\log\open_loop.lvm using Excel. From Excel select the data tab then select 'from text'. Navigate to the log directory and select All Files from the drop down box. You should now be able to open the openloop text file in Excel. When prompted by Excel select Finish and ok in order to paste the data into the worksheet. Select the three columns of data then insert a scatter chart. Alternatively we may require a very fast response in order for the motor to track a rapidly changing input.
Test 2: Set the set point to 1 Volt (do not press enter). click the record button. From the generated Excel data determine the time constant of the system.
Test 3: Set the set point to 1.5 Volts and determine the time constant attain. Try the same test at 2 Volts. You should find that the time constants for each test are approximately the same as shown in Fig.7. The reason that they are not exact is due to nonlinearities associated with the motor.
Closed Loop Tests
Test 1: Set the proportional gain (KP) to 1 and the integral and derivative both to zero. Set the set point to 10000 RPM. You should notice that the speed of the motor does not match the desired set point. Is this expected and if so why?
From your derived transfer function determine what the closed loop steady state error should be. Record your result for your report.
Test 2: Increase the proportional gain in steps of I. Comment on the system response.
At what level of gain does the motor start to oscillate? Record the motors response at this gain and determine the period of the oscillation.
Figures 9 and 10 show that the output approaches the input with increasing Kp. From figure 10 it is also clear that the time constant of the system is reduced as Kp is increased. This means that by changing the gain of the system the transient response time can be adjusted. Eventually the time constant cannot be reduced further due to limitations on the power supply and mechanics of the system. Clearly by adjusting the gain alone the output will never reach the desired set point since it starts to oscillate before this point is reached.
Test 3: Set the set point to zero. Reduce Kp to 1 and set the integral gain (Ki) to 1. Change the set point to 10000 RPM. Comment on the system response.
Test 4: Set the set point to zero again and set Kp to 10 with K, left at 1. Change the set point to 10000 RPM. Comment on the system response.
Test 5: Set the set point to zero again, reduce Kp to I and set K. to 10. Change the set point to 10000 RPM. Comment on the system response.
What happens if Ki is increased further for example to 30?
Test 6: Set the set point to zero. Set Kp to 1 and Ki to 30. Change the set point to 10000 RPM. Record your results. Set the set point to zero again and set the derivative gain (Ka) to 0.1. Change the set point to 10000 RPM and compare your results with the system with no derivative gain. Comment on your Results. What is the effect of the derivative gain?
Test 7: Set the set point to zero. Set Kp to 1, Ki to 10 and Kd to O. Change the set point to 10004 RPM. When the system has stabilised gently touch the flywheel with a piece of card or brunt Comment on the system response. Record your results.
Test 8: Try to optimise the response of the system manually using the knowledge you have gained from the the previous tests. Aim for a fast response with minimal overshoot and fast settling time.
Test 9: Using the values from test 2 for the gain and period of oscillation use the Ziegler Nichols table to optimise fir a P1 controller.
It may not be possible to design a full PID controller as the derivative component may cause instability to the system. Comment on why this might be.
Attachment:- Open loop and closed loop speed control.rar