



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An introduction to control systems, specifically focusing on proportional controllers and their application in closed-loop systems. The lab aims to develop a controller using feedback from a sensor to adjust ambient light levels dynamically. Topics covered include open-loop vs closed-loop systems, error terms, and the use of proportional controllers. Students will construct a closed-loop system using an avr microcontroller and a cds photocell.
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!
There are many examples of feedback in everyday life, such an example is a speeding ticket. Consider the ticket as an “error term” where a large ticket means that you exceeded the limit by a greater amount compared to a small ticket. Hopefully, a ticket motivates you to drive slower and a larger ticket convinces you to drive slower, faster.
The use of feedback to control a system functions on similar principles. The device built in this lab is a Proportional Controller. The exact reason for its name will be evident by lab’s end. The idea is to develop a controller that uses feedback from a sensor to drive a closed-loop system that dynamically adjusts operations to compensate for external disturbances or interferences.
There are two basic types of control systems: open loop and closed loop. Both types of control systems use reference, r(t), and control, u(t), signals. Open loop systems do not use feedback, while closed loop systems rely on feedback.
For demonstration purposes think of an assembly plant and a controller that controls operations in the plant. In an open-loop system the controller does not recognize that the plant might be generating output other than what it requested when it set u(t), therefore it is not possible for the controller to modify u(t) to account for variations in y(t). One reason that y(t) might vary from u(t) is because the mathematical model of the plant does not account for a state or event in the plant, in which case u(t) does not directly correlate to y(t). Another possible reason is that external, uncontrollable, events are affecting the plant’s output.
Figure 5-1 – Block Diagram of an Open-Loop System
controller plant h(t)
r(t) u(t)^ y(t)
Figure 5-1 shows a reference signal, r(t), a control signal u(t), and an output signal y(t). h(t) is the plant’s transfer function and y ( t )= u ( t )∗ h ( t )where (^) ∗ is the convolution
operator. Usually a reference signal is a human controlled input that indicates the desired output to the controller. A volume control or gas pedal qualifies as a reference signal.
In closed-loop system a Proportional Controller dynamically adjusts u(t) based on the error term, e(t), where: e ( t )= r ( t )− ky ( t )where k = 1 for unity feedback. A proportional
controller computes the adjustment to the control signal, u(t), by simply adding the error term to u(t). In an analog closed loop system the error term e(t) is continuously calculated. Digital systems compute e(t) and u(t) at discrete time intervals, such as:
u(t 2 )=u(t 0 ) + e(t 1 ), where t 2 >t 1 >t 0 and e(t 1 )=r(t 0 )-y(t 0 ). Iterative logic in a digital controller easily implements these calculations.
Figure 5-2 – A Closed-Loop System with Unity Feedback
controller
r(t) u(t) (^) plant y(t) h(t)
e(t)
Feedback enables a system to become stable and to return to a stable condition when external events disrupt or perturb a system. In return for being stable a system exhibits a slowed response to changes in a reference signal or to external events. The mechanisms for a control system using feedback are: proportional, derivative, integral or of these mechanisms combined into a PID controller. The PID controller is very common in industry.
The choice of a controller depends on the application’s requirements. This lab builds an application that uses the duty cycle of the PWM signal to dynamically adjust ambient light levels. The controller increases the duty cycle of the PWM in order to apply more power to the LED and thereby increase its intensity. The PWM is the control, u(t), that is fed into the plant (that is, LED).
This particular product experiences perturbations on a regular basis. Someone might open a curtain or turn on another light. The controller should respond to increases in ambient light by decreasing the PWM signal’s duty cycle which in turn dims the LED (plant) such that the total ambient light matches the reference signal.
Changes to the LED’s intensity can occur as fast as the mcu computes and updates the PWM duty cycle register (OCR2). For this application one update every 100 milliseconds is more than sufficient. One milli-second is very slow compared to how fast ambient light fills a room. At speeds of human perception 100 milliseconds is fast but detectable. These timing considerations drive the requirement for only needing to use a proportional controller. Hint. A maximum change of 2% to 4% to the duty cycle every 50 - 100 ms implements a nice smooth transition of the LED’s intensity.
As you can imagine this is just the surface of a deep topic. If this material is interesting consider taking other courses that discuss feedback and specifically control systems, such as ECE4510 or ECE4520 (ECE3510 is a pre-requisite for both courses). However, this lab is a practical hands-on approach. We need just enough information to know that the design is grounded on theory.
Circuit 5-1 – A Closed-Loop Control System
ATMEGA16L
VTG 150 10K
SW
VTG 150 10K
SW PB
PB
PC
RXD TXD
To Computer Serial Port
14 15
1
2
(^22) LED
VCC VTG 10K
150
VTG 150 10K
SW
PC1 23
PB2 3
VTG 150 10K
SW
PB3 4
VTG 150 10K
SW
PB4 5
LED
VCC VTG 10K
150
LED
VCC VTG 10K
LED
VCC VTG 10K
LED
VCC VTG 10K
150 150 150
PC2 24 PC3 25 PC4 26
OC (PD7)
21 130 Ω Sensor
200KΩ
LED
ADC (PA0)
40 VTG
V_Feedback R
R
Describe your closed-loop system in the lab report. Include data obtained from different intensities of light. Demonstrate your circuit to the lab instructor.
Pre-Lab Questions for Lab 5 Name: ______________________________
10 points total, 4 points for question 1 and 6 points for question 2.