Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lecture on Lab 6 Lab 7 Lab 8. 2 Lab 6: Open Loop Controller As you learned in lab 5, there are two kinds of control systems: open loop and closed loop.

Similar presentations


Presentation on theme: "1 Lecture on Lab 6 Lab 7 Lab 8. 2 Lab 6: Open Loop Controller As you learned in lab 5, there are two kinds of control systems: open loop and closed loop."— Presentation transcript:

1 1 Lecture on Lab 6 Lab 7 Lab 8

2 2 Lab 6: Open Loop Controller As you learned in lab 5, there are two kinds of control systems: open loop and closed loop. Your task of this lab is to build an open loop DC motor controller. The ‘plant’ to be controlled in this lab is a DC motor. The speed of the motor is controlled by a power FET. The signal to the gate of the FET is the PWM output of the microprocessor (μP). The greater the duty cycle of the PWM output, the faster the motor turns. The circuit is shown in the next slide.

3 3 Lab 6: Open Loop Controller Motor Speed Control with Power FET

4 4 Lab 6: Open Loop Controller The RPM of the DC motor is sensed with the NTE3100 optical sensor that was used in lab 3. The DC motor spins a disk or paddle that interrupts the IR beam between the LED and the sensor in the NTE3100. The NTE3100 is then connected as the clock source of a counter in the μP. As shown in a figure in the next slide.

5 5 Lab 6: Open Loop Controller Each rotation of the DC motor thus registers as a count. By reading the count periodically, the RPM of the motor is determined.

6 6 Lab 6: Open Loop Controller In-Lab task –Build an open loop controller based on the circuits in figures 1 and 2. Use the various VTG pins for Vcc. –Use the switches on the STK500 board to vary the duty cycle of the PWM output from 0% to 100%. –Program the switches on the STK500 to control the RPM of the DC motor. –Use HyperTerminal to record actual RPM versus commanded RPM for various step changes in commanded RPM. –Use Excel to graph the commanded RPM versus actual RPM data. You need to complete this in-lab task and report it in your report.

7 7 Lab 6: Open Loop Controller You need to produce this figure based on your experimental data.

8 8 Lab 6: Open Loop Controller You need to produce this figure based on your experimental data

9 9 Lab 6: Open Loop Controller SwitchPWM%OCR2 Value SW0 15.625% 0x28 SW1 SW2 SW3 SW4 SW5 SW6 SW7 You need to construct this table according to your data !!

10 10 1. Initialize peripherals in Atmel  P: –Port A : Input from the switches –Port B : Timer 0 input on pin 0 –Port D : PWM output on pin 7 –UART : 9600 baud, 8-N-1 –Timer0 : Counts pulses, heart beat signal and others –Timer1 : Hold the count of the number of times the blade on the motor blocks the optical sensor, etc. –Timer2 : non-inverted 8-bit PWM, value in OCR2 register determines the pulse width. Lab 6: Open Loop Controller Continue the rest of the program based on your design.

11 11 Lab 7: Simple Feedback Controller With a feedback controller, plant output is sampled and used to correct control signals to the plant so that plant output adjusts to the desired output value In this case, the plant output is DC motor RPM, the output is sampled by measuring RPM with the NTE3100 optical sensor and the control signal is the duty cycle of the PWM signal to the FET You will build a simple feedback controller that samples RPM and adjusts the PWM so that the motor turns at the commanded RPM This controller is a simple feedback controller because it does not do any math (such as integration, derivative) to figure out the fastest way to achieve the commanded RPM.

12 12 Lab 7: Simple Feedback Controller Lab 7: In-lab Task Modify the software from Lab 6 so that the actual RPM is used to nudge the PWM output in the necessary direction. –If the measured RPM is too low, increment the PWM OCR value by one. –If the measured RPM is too high, decrease the PWM OCR value by one. An important consideration is how often to sample the RPM and correct the PWM OCR. This is the control frequency. A control frequency of 10 Hz will work well for this lab. Using HyperTerminal, collect commanded RPM versus actual RPM data for several step changes in commanded RPM.

13 13 Lab 7: Simple Feedback Controller You need to produce the above figure based on your experimental data.

14 14 Lab 8: Proportional Feedback Controller In Lab 8, you will add proportionality to the controller to improve its response time. Like the simple feedback controller, the actual RPM will be very close to the commanded RPM. Unlike the simple controller, the response time should be very short. Commanded changes to RPM should very quickly be seen in actual RPM.

15 15 Lab 8: Proportional Feedback Controller Lab 8: In-lab Task Modify the software from Lab 6 or Lab 7 so that the amount by which the PWM OCR is adjusted depends on the size of the error between actual and commanded RPM. Using HyperTerminal, collect commanded RPM versus actual RPM data for several step changes in commanded RPM. Plot the data as in Lab 6. Controller response time should be improved compared to the simple feedback controller in Lab 7.

16 16 Lab 8: Proportional Feedback Controller You need to produce the above figure in your report based on your experimental data. ECE5330 students need to do Integration and derivative as well.


Download ppt "1 Lecture on Lab 6 Lab 7 Lab 8. 2 Lab 6: Open Loop Controller As you learned in lab 5, there are two kinds of control systems: open loop and closed loop."

Similar presentations


Ads by Google