What a control system is
لم يُترجم بعد؛ يُعرض باللغة الإنجليزية
عن هذا الدرس
A control system keeps something where you want it without a person watching. Follow one room and one heater: first with the heater fixed at a power worked out in advance (open loop), then with a thermometer feeding the temperature back to a three-line Python rule (closed loop). A cold snap shows why feedback is worth the trouble.
Keep a room at 20 °C
A control system makes something behave the way we want, on its own, with nobody watching. Our job: keep a room at 20 °C while it is 10 °C outside. The value we ask for is the goal, also called the setpoint.
goal (setpoint) 20 °C outside 10 °C room right now 10 °C A control system = something that keeps an output where we ask, without a person adjusting it by hand.
اقرأ الدرس خطوة بخطوة
Keep a room at 20 °C
A control system makes something behave the way we want, on its own, with nobody watching. Our job: keep a room at 20 °C while it is 10 °C outside. The value we ask for is the goal, also called the setpoint.
goal (setpoint) 20 °C outside 10 °C room right now 10 °C A control system = something that keeps an output where we ask, without a person adjusting it by hand.The plant and its output
The thing being controlled is called the plant; here it is the room. The quantity we care about, its temperature, is the output. Right now the room is 10 °C, as cold as outside.
plant the room output room temperature, 10 °C now The room loses heat through its walls. The warmer it is than outside, the faster it loses heat. Time constant 40 min: about how long it takes to get two-thirds of the way to where it is heading.The heater is our handle
We cannot set a temperature directly. We can only choose how hard the heater works, from 0 to 3 kW. The part that pushes on the plant is the actuator, and its setting is the plant's input.
actuator electric heater, 0 to 3 kW input heater power (kW) output room temperature (°C) Every kW held long enough warms the room 7.5 °C above the outside.Open loop: set and forget
We work out once that 1.33 kW holds 20 °C on a 10 °C day and fix the heater there. The controller, the part that decides the heater power, never looks at the room. That is open-loop control. After three hours: 19.9 °C.
# open loop: the power is decided once import math TAU, R = 40, 7.5 # min, °C per kW temp, power, dt = 10.0, 1.33, 0.1 for n in range(1800): # 180 min target = 10.0 + R * power temp = target + (temp - target) * math.exp(-dt / TAU) print(round(temp, 1)) # 19.9A cold snap
At three hours the outside drops to 4 °C. Nothing tells the controller, so the heater stays at 1.33 kW and the room slides down to 14.1 °C. A change nobody asked for, like this one, is a disturbance.
t = 180 min outside 10 °C → 4 °C heater still 1.33 kW room at 360 min 14.1 °C (heads for 14.0 °C) Open loop only works if the world stays exactly as we assumed when we set it.Measure the output
Start again, and this time add a thermometer, the sensor. It measures the room and sends the reading back to the controller. That path backwards, from the output to the controller, is feedback. It closes the loop.
sensor thermometer in the room reading 10.0 °C → controller feedback the output is measured and sent back to the controller closed loop goal → controller → heater → room → sensor → controllerCompare: the error
The controller subtracts the reading from the goal. The difference is the error: 20 − 10 = +10 °C. A positive error means too cold, a negative one too warm, and zero means spot on.
error = goal - temp = 20.0 - 10.0 = +10.0 °C (too cold) error > 0 too cold error < 0 too warm error = 0 on targetAct on the error
Our rule: 5 kW of heat for every °C of error, kept between 0 and 3 kW. An error of 10 °C asks for 50 kW, more than the heater has, so it runs flat out at 3 kW.
power = 5 * error # 5 × 10 = 50 kW power = min(max(power, 0), 3) # → 3 kW The bigger the error, the harder the heater works. This rule is called proportional control.Round and round
Measure, compare, act, every six seconds. As the room warms, the error shrinks and the heater eases off. The room passes 19 °C after 21 minutes and settles at 19.7 °C, where 1.3 kW balances the heat lost.
# closed loop: decide again every 0.1 min import math TAU, R, goal = 40, 7.5, 20.0 temp, dt = 10.0, 0.1 for n in range(1800): # 180 min error = goal - temp # compare power = min(max(5 * error, 0), 3) target = 10.0 + R * power temp = target + (temp - target) * math.exp(-dt / TAU) print(round(temp, 1)) # 19.7Feedback fights the cold
The same cold snap hits at three hours. The error grows a little, so the heater turns itself up to 2.1 kW. The room settles at 19.6 °C. Open loop fell to 14.1 °C.
t = 180 min outside 10 °C → 4 °C open loop closed loop heater 1.33 kW 1.3 → 2.1 kW room at 360 14.1 °C 19.6 °C Nobody told the controller about the weather: the thermometer did.Why it is worth the trouble
Feedback cost us a sensor and a rule, and it still leaves a small error (0.4 °C). In return it corrects for changes nobody predicted. Cruise control, autopilots and your body's temperature all work round this loop.
feedback costs a sensor, a rule, wiring it gives corrects disturbances nobody predicted still left error 0.4 °C (later lessons show how to remove it) open loop 14.1 °C closed loop 19.6 °C
أسئلة سريعة: 5
اختر إجابة واحدة لكل سؤال. يمكنك تغيير اختياراتك قبل التحقق منها.
01In the room-heating example, which part is the plant?
The plant is the thing being controlled. Its output, the room temperature, is what we care about. The heater is the actuator that pushes on it.
02What makes a control system closed loop?
Feedback is the path from the output back to the controller. Open-loop control can still use a computer, but it never looks at the result.
03The goal is 20 °C and the thermometer reads 18 °C. What is the error, and what should the heater do?
error = goal − measured = 20 − 18 = +2 °C. A positive error means too cold, so the controller asks for more heat.
04Outside drops from 10 °C to 4 °C. Why does the open-loop room fall to about 14.1 °C while the closed-loop room stays near 19.6 °C?
Both heaters have the same 0 to 3 kW range. Only the closed loop measures the room, so only it notices the disturbance and raises the power, here to 2.1 kW.
05Which of these is a fair cost of using feedback?
Feedback needs something to measure the output, and a simple proportional rule leaves a small error (0.4 °C here). Later lessons show how to remove it.
المسرد
- Controller
- The rule (here a few lines of Python) that decides what the actuator should do. Ours is proportional control: the heater power grows with the error.
- Plant
- The thing being controlled, here the room. Its output is the quantity we care about.
- Setpoint (goal, reference)
- The value we ask the output to reach and hold, here 20 °C.
- Actuator
- The part that pushes on the plant, here the heater. Its setting is the plant's input.
- Sensor
- The part that measures the output, here a thermometer.
- Error
- Goal minus measured output. Positive means too low, negative too high.
- Disturbance
- An outside change nobody asked for that moves the output, like a cold snap.
- Feedback (closed loop)
- Measuring the output and sending it back to the controller. A system with feedback is closed loop; one that never looks at its output is open loop.
الملاحظات والمصادر
- The room is a simple model with illustrative numbers: it heads towards the outside temperature plus 7.5 °C for every kW of heat, with a 40-minute time constant. Every curve and number in the figure is computed from that model.
- A household thermostat often just switches the heater fully on below the goal and off above it, with a small band in between. That is feedback too; this lesson uses a smoother rule so the heater power can be read at every moment.
- The small error left by the proportional rule (0.3 °C, then 0.4 °C) is called steady-state error. A later lesson in this course shows why it appears and how integral action removes it.
- The Python on each step is plain Python 3 with the math module. It updates the controller every 0.1 minutes and moves the room forward with the exact solution of its equation between updates, just as the figure does.
- N. S. Nise, Control Systems Engineering, 8th ed., Wiley (ch. 1)
- K. Ogata, Modern Control Engineering, 5th ed., Pearson (ch. 1; §4-5 thermal systems)
- G. F. Franklin, J. D. Powell, A. Emami-Naeini, Feedback Control of Dynamic Systems, 8th ed., Pearson (ch. 1)
- MIT OpenCourseWare 16.06 Principles of Automatic Control (S. Hall)
- MIT OpenCourseWare 6.302 Feedback Systems (Roberge, Dawson, Lundberg)
- Python Control Systems Library (python-control) documentation
اختبار يتاح بعد الخطوة الأخيرة.