Exam 1 Review
CMPSC 304 Robotic Agents
Exam Date: February 13, 2026
Format: Paper exam, closed everything
Duration: 50 minutes
Questions: 10 total
- 5 multiple-choice
- 3 short answer
- 2 scenario-based
Press Space or → to advance
What's Covered on Exam 1?
Topics: Everything from week 1 through week 4
- Locomotion and stability
- Actuators and motors
- Arduino and electronics
- Sensors and perception
- Kinematics and DoF
Not covered: PLCs and beyond
Study Materials
Project 1
- Wheeled Robot documentation and code
Slides
- Locomotion
- Motors and Arduino
- Sensors
Activities
- Activity 1: Servo Motor Control
- Activity 2: Distance Sensors
- Activity 3: Environmental Sensors
Readings
- IAR Ch 1: Introduction
- IAR Ch 2.1-2.3: Locomotion & DoF
- IAR Ch 6: Actuators
- IAR Ch 7: Sensors
Review Game Rules
How to Answer:
- Multiple Choice: Raise the correct colored paper 🔴 🟢 ⚫ 🟠
- First person with correct color gets to answer!
- Short Answer & Scenarios: Raise your hand ✋
- First hand up gets to answer!
Scoring:
- 🥇 1st place team: +1 point on exam
- 🥈 2nd place team: +0.5 points on exam
- 🥉 3rd place team: +0.25 points on exam
Work together with your team, but only one person answers at a time!
MULTIPLE CHOICE
QUESTIONS
🔴 🟢 ⚫ 🟠
Multiple Choice Practice 1
What type of stability requires constant motion to avoid falling?
🔴 Red: Static stability
🟢 Green: Dynamic stability
⚫ Black: Kinematic stability
🟠 Orange: Passive stability
First hand up gets to answer!
Answer: 🟢 Green - Dynamic stability
Dynamic stability requires the robot to be constantly in motion to remain upright.
Examples:
- Bicycle (must keep moving to stay balanced)
- Two-wheeled segway
- Running quadruped (two legs always in air)
Static stability means stable when NOT moving (e.g., four-legged table, six-legged insect walking).
Multiple Choice Practice 2
What term describes a robot's ability to sense its OWN internal state (joint angles, speeds, torques)?
🔴 Red: Exteroception
🟢 Green: Proprioception
⚫ Black: Perception
🟠 Orange: Interoception
Answer: 🟢 Green - Proprioception
Proprioception = sensing the robot's internal state
- Joint angles (encoders)
- Joint speeds (encoders/tachometers)
- Joint torques (current sensors, F/T sensors)
- Robot orientation (IMU: accelerometer, gyroscope)
Exteroception = sensing the external environment
- Distance to obstacles (ultrasonic, laser)
- Vision (cameras)
- Temperature, light, sound
Both are essential for autonomous robots!
Multiple Choice Practice 3
What Arduino function is used to control motor SPEED by rapidly switching a digital pin on and off?
🔴 Red: digitalWrite()
🟢 Green: analogWrite()
⚫ Black: analogRead()
🟠 Orange: digitalRead()
Answer: 🟢 Green - analogWrite()
analogWrite() uses PWM (Pulse Width Modulation) to control motor speed
- Rapidly switches pin HIGH/LOW at ~500 Hz
- Values: 0 (off) to 255 (on), average voltage = (dutyCycle / 255) × 5V
- Arduino PWM pins: 3, 5, 6, 9, 10, 11 (marked with ~)
Example: analogWrite(motorPin, 128); → 50% duty cycle → half speed
Why PWM? Motors need varying voltage; PWM simulates this with digital signals!
Multiple Choice Practice 4
A sensor that measures how CONSISTENT repeated measurements are (not necessarily correct) has high:
🔴 Red: Accuracy
🟢 Green: Precision
⚫ Black: Resolution
🟠 Orange: Bandwidth
Answer: 🟢 Green - Precision
Precision = repeatability/consistency of measurements
- High precision: measurements cluster tightly together
- Low precision: measurements spread out (high variance)
Accuracy = closeness to TRUE value
- High accuracy: measurements close to actual value
- Low accuracy: systematic error (bias)
Other terms:
- Resolution: smallest measurable difference
- Bandwidth: measurement rate (Hz)
- Range: difference between max and min measurable values
Best case: High accuracy AND high precision!
Multiple Choice Practice 5
A differential drive robot has TWO powered wheels. How many mechanical DoF does it have?
🔴 Red: 1 DoF
🟢 Green: 2 DoF
⚫ Black: 3 DoF
🟠 Orange: 4 DoF
Answer: 🟢 Green - 2 DoF
Mechanical DoF = number of independently controlled actuators
- Differential drive: 2 motors → 2 mechanical DoF
- Each motor speed can be controlled independently
BUT: Can achieve 3 Cartesian DoF (X, Y, θ) by coordinating
- Both forward → move forward (Y)
- Different speeds → turn (θ)
- Opposite directions → rotate in place (θ)
Key distinction:
- Mechanical DoF: actuated joints (platform-dependent)
- Cartesian DoF: movement directions in space (task-dependent)
Multiple Choice Practice 6
A car cannot move sideways without first rotating. What type of constraint is this?
🔴 Red: Holonomic constraint
🟢 Green: Dynamic constraint
⚫ Black: Kinematic constraint
🟠 Orange: Geometric constraint
Answer: ⚫ Black - Kinematic constraint
Kinematic constraint = restriction on how a robot can move
- Car wheels must roll (not slide) → kinematic constraint
- Limits instantaneous motion directions
- Cannot move sideways without first rotating
Types of kinematic constraints:
- Holonomic: can reach any position/orientation with any path
- Non-holonomic: velocity constraint (fewer controllable DoF than total DoF)
Examples:
- Car with Ackermann steering (non-holonomic kinematic constraint)
- Differential drive robot (non-holonomic kinematic constraint)
- Mecanum/omni wheels (holonomic - no constraint)
Multiple Choice Practice 7
How many Cartesian DoF does a robot have when moving on a flat 2D plane?
🔴 Red: 2 DoF (X, Y)
🟢 Green: 3 DoF (X, Y, θ)
⚫ Black: 4 DoF (X, Y, Z, θ)
🟠 Orange: 6 DoF (X, Y, Z, pitch, yaw, roll)
Answer: 🟢 Green - 3 DoF (X, Y, θ)
On a 2D plane:
- X position (left/right)
- Y position (forward/backward)
- Orientation θ (rotation angle/yaw)
Key distinction:
- Cartesian DoF: positions/orientations in space (task-dependent)
- Mechanical DoF: number of actuated joints (platform-dependent)
In 3D space: 6 DoF
- 3 translations: X, Y, Z
- 3 rotations: pitch, yaw, roll
Multiple Choice Practice 8
Which distance sensing principle measures the TIME it takes for a signal to travel to an object and back?
🔴 Red: Reflection (amplitude)
🟢 Green: Time-of-flight
⚫ Black: Phase shift
🟠 Orange: Triangulation
Answer: 🟢 Green - Time-of-flight
Time-of-flight = measures travel time of signal
- Ultrasonic sensors: emit sound pulse, measure return time
- Sound travels at ~344 m/s → distance = (time × speed) / 2
- Laser ToF: uses light (3×10⁸ m/s), requires very fast electronics
Other methods:
- Reflection (amplitude): IR sensors measure reflected signal strength
- Phase shift: measures wave phase difference
- Triangulation: uses geometry with multiple sensors
Multiple Choice Practice 9
What makes a robot "autonomous" according to the textbook definition?
🔴 Red: It can move on its own power
🟢 Green: It makes decisions in response to its environment
⚫ Black: It has sensors and actuators
🟠 Orange: It follows pre-programmed motions
Answer: 🟢 Green - It makes decisions in response to its environment
Autonomous robot = makes decisions based on environment (not just pre-programmed)
Key characteristics:
- Senses environment
- Processes sensor data (computation)
- Makes decisions autonomously
- Actuates based on those decisions
Example from Ch.1: The 1961 Unimate robot
- Could pour beer, play golf, conduct orchestra
- BUT: all motions were pre-programmed
- Environment was carefully staged
- NOT autonomous by modern definition!
Multiple Choice Practice 10
Which actuator type uses AIR pressure and is well-suited for soft robotics applications?
🔴 Red: Hydraulic actuator
🟢 Green: Pneumatic actuator
⚫ Black: Stepper motor
🟠 Orange: Servo motor
Answer: 🟢 Green - Pneumatic actuator
Pneumatic actuator = operates using compressed air
- Air is highly compressible → compliant, safe
- Lightweight, available in small form factors
- Lower force than hydraulics, but suitable for soft robotics
- Can create arbitrary bending/twisting motions
Hydraulic actuator:
- Uses pressurized liquid (incompressible)
- Very high forces, but large/heavy
- Used in construction equipment, large robots
Soft robotics: Can be modeled as having infinite mechanical DoF!
Short Answer Practice 1
Define "kinematics" and "dynamics" in robotics. How do they differ?
First hand up gets to answer!
Sample Answer
Kinematics = the study of motion (position, velocity) without considering forces
- Describes HOW individual parts of a robot move relative to each other and the environment
- Concerned with: position, speed (first derivative of position)
- Example: calculating end-effector position from joint angles
Dynamics = the study of forces and torques that cause motion
- Describes WHY motion occurs
- Concerned with: acceleration (second derivative), jerk (third derivative), forces, torques, mass
- Example: calculating motor torques needed to lift a payload
Key difference: Kinematics ignores forces; dynamics requires understanding forces and mass.
Short Answer Practice 2
Explain what PWM (Pulse Width Modulation) is and how it's used to control DC motor speed.
Sample Answer
PWM (Pulse Width Modulation) = technique to simulate analog voltage using digital signals
- Rapidly switches digital pin HIGH (5V) and LOW (0V) at fixed frequency
- Duty cycle: percentage of time signal is HIGH
- 0% duty cycle = always off (0V average)
- 50% duty cycle = half time on (2.5V average)
- 100% duty cycle = always on (5V average)
Motor speed control:
- Motor averages the rapid on/off pulses
- Higher duty cycle → higher average voltage → faster rotation
analogWrite(motorPin, 0-255) sets duty cycle
- Example:
analogWrite(motorPin, 128) → 50% speed
Why use PWM? Arduino outputs only digital (0V or 5V), not true analog voltages.
Short Answer Practice 3
Explain the relationship between a robot's center of mass and its static stability. Why does a lower center of mass improve stability?
Sample Answer
Center of mass (CoM) = point where robot's weight is concentrated
Static stability condition:
- Robot is stable if vertical projection of CoM falls INSIDE support polygon
- Support polygon: area bounded by contact points with ground
- If CoM projects outside → robot tips over
Why lower CoM improves stability:
- Lower CoM → smaller tipping moment (torque = force × distance)
- Robot can tilt further before CoM projection exits support polygon
- More resistant to external forces (pushing, inclines)
Design implications:
- Place heavy components (battery, motors) low in robot
- Wider wheelbase → larger support polygon → more stable
- Six-legged insects very stable (large support polygon)
Scenario Practice 1
Your wheeled robot moves forward when both motors are powered, but when you try to turn left, the robot barely moves and the left motor gets hot.
Identify two potential causes and explain how you would diagnose them.
First hand up gets to answer!
Sample Answer
Potential Cause 1: Wiring issue (reversed polarity)
- Diagnosis: Check that left motor wires are connected correctly to motor driver (IN1/IN2)
- Test: Swap IN1/IN2 connections and see if behavior changes
- Fix: Rewire motor to correct terminals
Potential Cause 2: Software bug (incorrect PWM values)
- Diagnosis: Print motor speed values to Serial Monitor during turn
- Test: Check if left motor PWM is too low or negative
- Fix: Adjust turn logic in code:
leftSpeed = baseSpeed - turnAmount;
Why motor gets hot: If motor is receiving power but can't turn (due to incorrect signal or mechanical binding), current increases → heat
Scenario Practice 2
You're designing a delivery robot for a warehouse with narrow aisles. The robot must carry heavy loads (20 kg) and make tight turns in confined spaces.
Questions:
- What locomotion mechanism would you choose and why?
- Where would you place the battery and motors to maximize stability?
- What constraint(s) does your design have?
Sample Answer
1. Locomotion: Differential drive
- Zero turning radius: rotate in place → perfect for narrow aisles
- Simple: only 2 motors, Robust: reliable for heavy loads
- Cost-effective: fewer components than mecanum/Ackermann
2. Component placement for stability:
- Battery: mount LOW and CENTERED (heavy → lower CoM)
- Motors: mount low, close to wheels
- Wide wheelbase: increases support polygon → prevents tipping
3. Constraints:
- Kinematic (non-holonomic): cannot move sideways instantly
- Must rotate first, then drive → multi-step maneuvers
Scenario Practice 3
Your Project 1 robot turns left when you command it to go straight. Both motors are connected to the motor driver and receive power.
Questions:
- List THREE possible causes (hardware OR software)
- For each cause, how would you test/diagnose it?
- What Arduino function would you use to check motor speeds?
Sample Answer
1. Motors wired with reversed polarity
- Test: Swap motor wires on ONE motor → see if direction changes
- Fix: Reverse wiring OR invert PWM logic in code
2. Unequal PWM values sent to motors
- Test:
Serial.println() to check leftSpeed vs rightSpeed
- Fix: Ensure equal:
analogWrite(leftPin, 150); analogWrite(rightPin, 150);
3. Mechanical issue (wheel slipping/different diameters)
- Test: Lift robot, check wheel speeds match
- Fix: Tighten wheel, replace if damaged, or compensate in code
Arduino debugging function: Serial.println() to monitor PWM values