You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/Lecture7.md
+6-11Lines changed: 6 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
10
10
## Open and Closed Loop Control Systems
11
11
12
-
Open and closedloop control systems are two fundamental types of control systems used in engineering, automation, robotics, and other fields to manage the behavior of devices or processes.
12
+
Open-loop and closed-loop control systems are two fundamental types of control systems used in engineering, automation, robotics, and other fields to manage the behaviour of devices or processes.
13
13
14
14
### Open-Loop
15
15
@@ -37,15 +37,15 @@ How it works:
37
37
- The actuator operates on the system.
38
38
- A sensor measures the actual output.
39
39
- The output is fed back and compared with the input (setpoint).
40
-
- The difference (error) is used to adjust the control action to reduce the error.
40
+
- The difference (error) is used to adjust the control action, thereby reducing the error.
41
41
42
42
Example:
43
43
44
-
A home thermostat works by allowing the homeowner to set a desired temperature. The system then measures the actual room temperature and adjusts the heater or cooler to reach and maintain the set temperature. As the system approaches—or overshoots—the desired temperature, it modifies its output accordingly.
44
+
A home thermostat allows homeowners to set a desired temperature. The system then measures the actual room temperature and adjusts the heater or cooler to reach and maintain the set temperature. As the system approaches—or overshoots—the desired temperature, it modifies its output accordingly.
45
45
46
46
## State Machine
47
47
48
-
A state machine (also known as a finite state machine or FSM) is a computational model used to design and describe systems that can be in one of a finite number of states at any given time. It transitions between these states in response to external inputs or events such as time, button presses of sensor values.
48
+
A state machine (also known as a finite state machine or FSM) is a computational model used to design and describe systems that can be in one of a finite number of states at any given time. It transitions between these states in response to external inputs or events such as time, button presses, or sensor values.
49
49
50
50
Key concepts:
51
51
@@ -59,7 +59,7 @@ Key concepts:
59
59
### Define the Controller Class and Initialiser
60
60
61
61
> [!Note]
62
-
> The subsystems (TrafficLightSubsystem, PedestrianSubsystem) are only used by the Controller Class and are tightly coupled to it, so we will keep them in the same `controller.py` file as the Controller Class for simplicity and easier maintenance. However, students can equally abstract them to individual `*.py` files for independance.
62
+
> The subsystems (TrafficLightSubsystem, PedestrianSubsystem) are only used by the Controller Class. They are tightly coupled to it, so we will keep them in the same `controller.py` file as the Controller Class for simplicity and easier maintenance. However, students can equally abstract them to individual `*.py` files for independence if they wish.
63
63
64
64
```python
65
65
classController:
@@ -74,7 +74,7 @@ class Controller:
74
74
buzzer,
75
75
debug=False,
76
76
):
77
-
#Initialize subsystems
77
+
#Initialise subsystems
78
78
self.__traffic_lights = TrafficLightSubsystem(
79
79
car_red, car_amber, car_green, debug
80
80
)
@@ -92,11 +92,6 @@ class Controller:
92
92
93
93
```python
94
94
defset_idle_state(self):
95
-
"""
96
-
Set system to idle state with traffic flowing and pedestrians stopped.
97
-
98
-
This is the default state when no pedestrian is waiting to cross.
0 commit comments