Unit 6 - Notes

ECE131

Unit 6: Fundamentals of embedded system and its application in industrial processes

1. Comparison of Microprocessor and Microcontroller

The distinction between a microprocessor and a microcontroller is foundational to understanding embedded systems. While both are integrated circuits that process data, their architectural goals differ significantly.

Microprocessor (P)

A microprocessor is a General Purpose Processor. It contains the Arithmetic Logic Unit (ALU), Control Unit (CU), and registers, but it does not have internal memory (RAM/ROM) or I/O peripherals on the chip.

  • Architecture: Generally follows Von Neumann architecture (unified memory).
  • Application: Personal computers, laptops, servers.
  • Focus: High performance and processing power.

Microcontroller (C)

A microcontroller is a complete computer on a single chip. It includes the CPU along with fixed amounts of RAM, ROM, I/O ports, timers, and serial communication interfaces integrated onto the same die.

  • Architecture: Often follows Harvard architecture (separate memory for program and data).
  • Application: Washing machines, remote controls, automotive ECUs.
  • Focus: Specific control functions, low power consumption, and cost-efficiency.

Key Differences Table

Feature Microprocessor Microcontroller
Structure Only CPU is present on the chip. Memory and I/O are external. CPU, RAM, ROM, and I/O are all embedded on a single chip.
Cost High (requires external components). Low (highly integrated).
Power Consumption High power consumption. Low power consumption (battery friendly).
Processing Speed Very fast (GHz range). Moderate to slow (MHz range).
Memory Flexible; can add large amounts of external RAM/ROM. Fixed; limited internal memory (though some allow expansion).
Instruction Set Complex (CISC/RISC) for extensive data manipulation. Specialized for bit-level manipulation and I/O control.
Example Intel Core i7, AMD Ryzen. Arduino (ATmega328), 8051, PIC16F.

2. Types of Processors: SOC, ASIC, DSP, and FPGA

Embedded systems utilize various processing architectures depending on the constraints of speed, power, volume, and cost.

A. System on Chip (SoC)

An SoC integrates all components of a computer or other electronic system into a single integrated circuit (chip). It may contain digital, analog, mixed-signal, and often radio-frequency functions.

  • Components: Microprocessor, GPU, WiFi/Bluetooth module, Memory, and Power management.
  • Advantages: Miniature size, low power consumption, high performance due to short internal wiring.
  • Application: Smartphones (Qualcomm Snapdragon, Apple Silicon), Raspberry Pi.

B. Application Specific Integrated Circuit (ASIC)

An ASIC is an IC customized for a particular use, rather than intended for general-purpose use.

  • Characteristics: The logic is permanently etched into silicon. It cannot be reprogrammed.
  • Advantages: extremely high efficiency and performance for the specific task; lowest unit cost at very high volumes.
  • Disadvantages: Extremely high Non-Recurring Engineering (NRE) costs; expensive to design.
  • Application: Bitcoin mining chips, specific automotive sensors.

C. Digital Signal Processor (DSP)

A DSP is a specialized microprocessor designed specifically for the digital processing of signals (audio, video, pressure, temperature).

  • Architecture: Optimized for mathematical operations, specifically "Multiply-Accumulate" (MAC) operations, which are common in signal processing algorithms (FFT, filters).
  • Advantages: Real-time processing of streaming data.
  • Application: Audio compression, noise cancellation headphones, radar systems, medical imaging.

D. Field Programmable Gate Array (FPGA)

An FPGA is a semiconductor device that can be configured (programmed) by the customer or designer after manufacturing. It consists of an array of programmable logic blocks.

  • Characteristics: Hardware is defined by software (HDL - Hardware Description Language like Verilog/VHDL).
  • Advantages: Parallel processing capabilities; reconfigurable (bugs can be fixed by updating the logic, not replacing the chip). Good for prototyping ASICs.
  • Application: Aerospace, defense systems, high-frequency trading, prototype development.

3. Introduction to Embedded Systems

Definition

An embedded system is a computing system—comprising a processor, memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electrical system.

Key Characteristics

  1. Dedicated Function: Unlike a PC (which can play games, write documents, etc.), an embedded system performs one specific task (e.g., an ABS system controls brakes).
  2. Resource Constrained: Limited memory, processing power, and energy (often battery-operated).
  3. Real-Time Operation: Must often react to stimuli within a strict timeframe.
  4. Reliability: Expected to run for years without crashing or needing a reboot.

Basic Architecture

  • Hardware: Sensor A/D Converter Processor (MCU/ASIC) D/A Converter Actuator.
  • Software (Firmware): The code is usually stored in Read-Only Memory (ROM) or Flash memory.

4. Real-Time Applications: GPOS vs. RTOS

Embedded systems often operate in "Real-Time," meaning the correctness of the system depends not only on the logical result but also on the time at which the result is delivered.

GPOS (General Purpose Operating System)

  • Examples: Windows, Linux, macOS, Android.
  • Goal: Maximize overall system throughput and user convenience.
  • Scheduling: Fairness-based. It may delay a high-priority task to finish a low-priority UI task.
  • Latency: Non-deterministic. You cannot guarantee exactly when a task will finish.

RTOS (Real-Time Operating System)

  • Examples: FreeRTOS, VxWorks, QNX.
  • Goal: Deterministic execution. Guaranteeing that critical tasks meet their deadlines.
  • Scheduling: Priority-based preemptive scheduling. The highest priority task always runs if it is ready.
  • Latency: Deterministic and minimal.

Comparison

Feature GPOS RTOS
Task Scheduling Fairness (Time-slicing). Priority-based Preemptive.
Interrupt Latency Variable (Jitter allowed). Minimal and bounded.
Kernel Size Large (Megabytes to Gigabytes). Small (Kilobytes).
Usage Desktop, Server, Mobile. Critical embedded systems (Airbags, Pacemakers).

Types of Real-Time Systems

  1. Hard Real-Time: Missing a deadline results in total system failure (e.g., Missile guidance).
  2. Soft Real-Time: Missing a deadline results in degraded quality but not failure (e.g., Video streaming buffering).

5. Cyber-Physical World

Definition

A Cyber-Physical System (CPS) is an integration of computation, networking, and physical processes. Embedded computers and networks monitor and control the physical processes, with feedback loops where physical processes affect computations and vice versa.

The Feedback Loop Structure

  1. Physical World: The actual environment (temperature, speed, fluid flow).
  2. Sensors: Convert physical data to digital signals.
  3. Cyber System: The embedded intelligence (algorithms, cloud computing) processes the data.
  4. Actuators: Convert digital decisions back into physical actions (turning on a motor, opening a valve).

Significance: CPS is the theoretical framework behind the "Internet of Things" (IoT) and "Industry 4.0". It represents the shift from closed systems to connected, intelligent systems interacting with the real world.


6. Role of IoT and Cloud Computing in Applications

The combination of Embedded Systems (Edge), Internet of Things (Connectivity), and Cloud Computing (Storage/Analytics) has revolutionized various sectors.

A. Condition Monitoring of Plant Processes

  • Role: Moving from "Reactive Maintenance" (fix when broken) to "Predictive Maintenance."
  • Implementation: Vibration, temperature, and acoustic sensors are attached to motors and turbines.
  • Cloud Function: Data is streamed to the cloud where Machine Learning algorithms detect anomalies (e.g., a specific vibration frequency indicating bearing wear).
  • Benefit: Reduces downtime and prevents catastrophic failure.

B. Healthcare (Internet of Medical Things - IoMT)

  • Role: Remote patient monitoring and smart diagnostics.
  • Implementation: Wearable devices (smartwatches, ECG patches) monitor vitals like heart rate, SpO2, and glucose levels.
  • Cloud Function: Doctors can monitor patients remotely. Algorithms can alert emergency services if a fall or heart attack is detected.
  • Benefit: Reduces hospital readmissions and enables elderly independence.

C. Agriculture (Smart Farming)

  • Role: Precision agriculture to maximize yield and minimize resource usage.
  • Implementation: Soil moisture sensors, drones for crop imaging, and automated irrigation systems.
  • Cloud Function: Integrating weather forecasts with soil data to determine the exact amount of water or fertilizer needed.
  • Benefit: Water conservation, higher crop yields, and reduced chemical runoff.

D. Manufacturing (Industrial IoT - IIoT)

  • Role: Automation and supply chain visibility.
  • Implementation: RFID tags on parts, robotic arms with vision systems, smart conveyers.
  • Cloud Function: Digital Twins (virtual replicas of physical systems) are used to simulate production changes before implementing them. Real-time inventory tracking.
  • Benefit: Just-in-Time (JIT) manufacturing, customized mass production, efficiency analysis.

E. Automobiles (Connected Vehicles)

  • Role: Autonomous driving, telemetry, and infotainment.
  • Implementation: LiDAR, cameras, engine control units (ECUs).
  • Cloud Function: Over-the-Air (OTA) software updates (like Tesla). Vehicles share traffic and hazard data with the cloud to warn other drivers (V2X communication).
  • Benefit: Improved safety (ADAS), predictive vehicle maintenance, dynamic routing.

F. Smart Grid

  • Role: Modernizing the electrical grid to handle two-way power flow and renewable energy.
  • Implementation: Smart Meters at homes, Phasor Measurement Units (PMUs) on transmission lines.
  • Cloud Function: Demand Response management (automatically lowering power consumption during peak loads). Balancing intermittent solar/wind energy with baseload power.
  • Benefit: Reduced energy theft, faster outage restoration, integration of green energy.