Electronics Guide

Feedback Processing

Introduction

Feedback processing forms the sensory foundation of digital motor control systems, providing the real-time information necessary to achieve precise speed, position, and torque regulation. Without accurate feedback, even the most sophisticated control algorithms cannot maintain desired motor performance. The quality of feedback processing directly determines control system bandwidth, positioning accuracy, and overall system reliability.

Modern motor control applications employ diverse feedback technologies ranging from optical and magnetic encoders to resolvers and Hall effect sensors. Each technology offers distinct advantages in terms of resolution, speed capability, environmental robustness, and cost. Additionally, sensorless control techniques have emerged as powerful alternatives that eliminate physical sensors by estimating motor state from electrical measurements, reducing system cost and improving reliability in applications where traditional sensors may fail.

This article explores the fundamental feedback processing techniques used in digital motor control, examining the interfaces, signal conditioning, and digital processing methods that transform raw sensor signals into the precise position, velocity, and current information required by modern control algorithms.

Feedback Requirements in Motor Control

Different motor control strategies impose varying requirements on feedback systems, and understanding these requirements guides the selection and implementation of appropriate feedback technologies.

Position Feedback Requirements

Servo applications demanding precise positioning impose stringent requirements:

  • Resolution: Determines minimum position increment, typically ranging from thousands to millions of counts per revolution
  • Accuracy: Difference between measured and actual position, affected by sensor linearity and mounting
  • Repeatability: Consistency of position measurement across multiple readings
  • Update Rate: How frequently new position information becomes available
  • Latency: Time delay between actual position change and measurement availability

Velocity Feedback Requirements

Speed control applications require accurate velocity information:

  • Bandwidth: How quickly velocity changes can be detected and measured
  • Resolution at Low Speed: Velocity measurement becomes challenging at low speeds with incremental sensors
  • Noise Immunity: Velocity calculation from position data amplifies measurement noise
  • Dynamic Range: Ratio between maximum and minimum measurable velocities

Current Feedback Requirements

Torque control relies on accurate current measurement:

  • Bandwidth: Must capture current waveforms at PWM switching frequencies
  • Accuracy: Current measurement errors directly affect torque control precision
  • Common-Mode Rejection: Isolate measurement from high-voltage switching transients
  • Sampling Synchronization: Coordinate current sampling with PWM timing

Environmental Considerations

Operating conditions influence feedback system design:

  • Temperature Range: Motors often operate in extreme thermal environments
  • Vibration and Shock: Mechanical disturbances can affect sensor integrity
  • Contamination: Dust, oil, and moisture exposure in industrial environments
  • Electromagnetic Interference: Proximity to power electronics creates noise challenges

Encoder Interfaces

Incremental and absolute encoders represent the most widely used position feedback devices in motor control applications. Digital processing of encoder signals requires careful interface design to maximize resolution and reject noise while maintaining high-speed operation.

Incremental Encoder Fundamentals

Incremental encoders generate pulse trains as the shaft rotates:

  • Quadrature Signals: Two channels (A and B) offset by 90 electrical degrees provide direction information
  • Index Pulse: Single pulse per revolution (Z channel) provides absolute reference
  • Line Count: Number of pulses per revolution determines base resolution
  • Edge Counting: Counting all transitions multiplies resolution by four (4x decoding)

Quadrature Decoding

Digital circuits extract position and direction from quadrature signals:

  • State Machine Decoding: Track quadrature state transitions to detect valid counts and direction
  • 1x Decoding: Count rising edges of channel A only (simplest approach)
  • 2x Decoding: Count both edges of channel A, using B for direction
  • 4x Decoding: Count all edges of both channels for maximum resolution
  • Error Detection: Invalid state transitions indicate noise or missed counts

Hardware Decoder Implementation

Dedicated hardware provides reliable high-speed decoding:

  • Microcontroller Peripherals: Many MCUs include quadrature encoder interface (QEI) modules
  • FPGA Implementation: Programmable logic enables custom decoder designs
  • Dedicated ICs: Specialized encoder interface chips provide complete solutions
  • Position Counter: Hardware counter accumulates encoder counts automatically
  • Capture Registers: Latch count values at precise time instants for velocity calculation

Signal Conditioning

Encoder signals require conditioning before digital processing:

  • Differential Receivers: Convert differential encoder outputs to single-ended logic
  • Schmitt Triggers: Add hysteresis to reject noise near threshold
  • Digital Filters: Low-pass filtering removes high-frequency noise
  • Debouncing: Eliminate multiple transitions from contact bounce in mechanical encoders
  • Level Translation: Match encoder output levels to controller input requirements

Absolute Encoder Interfaces

Absolute encoders provide position without requiring homing:

  • Parallel Interface: Multiple output lines provide simultaneous position bits
  • Serial Interfaces: SSI, BiSS, EnDat, and Hiperface protocols transfer position data serially
  • Single-Turn vs. Multi-Turn: Multi-turn encoders track complete revolutions
  • Gray Code: Single-bit transitions prevent ambiguity at code boundaries
  • Battery Backup: Multi-turn encoders may require battery to maintain count during power-off

High-Resolution Techniques

Advanced methods increase effective encoder resolution:

  • Interpolation: Subdivide encoder cycles using analog signal processing
  • Sine-Cosine Encoders: Generate sinusoidal outputs enabling high interpolation factors
  • Digital Interpolation: ADC sampling of analog signals with digital subdivision
  • Typical Factors: 10x to 4096x interpolation multiplies base resolution

Resolver-to-Digital Conversion

Resolvers provide robust absolute position feedback particularly suited to harsh environments where optical encoders would fail. These electromagnetic sensors output analog signals that require specialized conversion to yield digital position and velocity information.

Resolver Operating Principle

Resolvers function as rotating transformers:

  • Reference Excitation: Sinusoidal carrier (typically 2-20 kHz) applied to rotor winding
  • Stator Outputs: Two windings displaced by 90 mechanical degrees
  • Amplitude Modulation: Output amplitudes vary sinusoidally with rotor angle
  • Mathematical Relationship: Sine output = K * sin(theta) * sin(wt), Cosine output = K * cos(theta) * sin(wt)

R/D Converter Architecture

Resolver-to-digital converters extract angle from modulated signals:

  • Tracking Converter: Servo loop tracks resolver angle continuously
  • Type II Loop: Second-order tracking loop provides velocity output
  • Digital Output: Parallel or serial position word (10-16 bits typical)
  • Velocity Output: Analog or digital velocity signal derived from tracking loop

Tracking Loop Operation

The tracking converter maintains angle estimate matching actual resolver angle:

  • Error Detection: Multiply sine output by cosine estimate and vice versa
  • Error Signal: Difference yields signal proportional to angle error
  • Demodulation: Synchronous detection removes carrier
  • Loop Filter: Integrator provides velocity estimate and drives VCO
  • Up/Down Counter: VCO output increments position register

Dedicated R/D Converter ICs

Integrated solutions simplify resolver interface design:

  • Complete Signal Path: Include excitation generation, signal conditioning, and conversion
  • Resolution Options: 10-bit to 16-bit position resolution available
  • Tracking Rate: Maximum velocity determines tracking bandwidth
  • Accuracy Specifications: Static accuracy and dynamic tracking error

Software-Based R/D Conversion

Modern implementations perform resolver conversion in software:

  • ADC Sampling: Sample resolver outputs with synchronized ADC
  • Demodulation: Multiply samples by reference sine/cosine and filter
  • Angle Calculation: Apply arctangent function to demodulated signals
  • CORDIC Algorithm: Efficient iterative method for arctangent computation
  • Tracking Observer: Software tracking loop with noise filtering

Resolver Signal Conditioning

Proper signal handling ensures accurate conversion:

  • Transformer Ratio: Resolver transformation ratio affects signal levels
  • Cable Effects: Long cables introduce phase shift and attenuation
  • Differential Inputs: Reject common-mode noise from motor environment
  • Anti-Aliasing Filters: Remove high-frequency noise before sampling
  • Reference Synchronization: Maintain phase coherence between excitation and demodulation

Error Sources and Compensation

Several factors affect resolver measurement accuracy:

  • Amplitude Imbalance: Unequal sine and cosine channel gains introduce error
  • Quadrature Error: Deviation from exact 90-degree displacement
  • Harmonic Distortion: Non-sinusoidal outputs create position-dependent errors
  • Compensation Tables: Calibration data corrects systematic errors

Hall Sensor Processing

Hall effect sensors provide simple, low-cost position feedback commonly used in brushless DC motor commutation. While offering lower resolution than encoders or resolvers, Hall sensors provide sufficient information for basic motor control and serve as backup or starting references in more sophisticated systems.

Hall Sensor Arrangement

Typical brushless motor Hall sensor configurations:

  • Three Sensors: Spaced 120 electrical degrees apart for three-phase motors
  • Six-State Output: Three binary sensors produce six unique states per electrical cycle
  • 60-Degree Resolution: Position known within 60 electrical degree sector
  • Commutation Information: Directly indicates which phases to energize

Digital Hall Interface

Hall sensors typically provide digital outputs requiring straightforward interface:

  • Open-Collector Outputs: Require pull-up resistors to logic supply
  • Input Capture: Timer capture registers record transition times
  • State Decoding: Convert three-bit Hall state to sector number
  • Sequence Validation: Verify proper state progression to detect errors
  • Glitch Filtering: Hardware or software filtering prevents false transitions

Velocity Estimation from Hall Signals

Speed measurement using Hall transitions:

  • Period Measurement: Measure time between consecutive transitions
  • Frequency Measurement: Count transitions within fixed time window
  • Resolution Limitations: Only six transitions per electrical cycle limits accuracy
  • Low-Speed Challenges: Long periods between transitions delay updates
  • Averaging: Multiple transition periods averaged for smoother reading

Position Interpolation

Techniques to improve position resolution between Hall transitions:

  • Linear Interpolation: Assume constant velocity between transitions
  • Timer-Based: Use elapsed time since last transition with measured period
  • Acceleration Compensation: Adjust interpolation for changing velocity
  • Observer Integration: Combine Hall signals with model-based estimation

Analog Hall Processing

Some systems use analog Hall outputs for higher resolution:

  • Linear Hall Sensors: Output voltage proportional to magnetic field
  • Sinusoidal Outputs: Arrange sensors to produce sine-cosine signals
  • ADC Sampling: Digitize analog Hall outputs for processing
  • Arctangent Calculation: Compute angle from sine and cosine values

Hall Sensor Alignment

Proper alignment ensures correct commutation:

  • Electrical vs. Mechanical: Hall positions relate to electrical angle, not mechanical
  • Pole Pair Factor: Electrical cycles per mechanical revolution equals pole pairs
  • Offset Calibration: Determine angle offset between Hall state and rotor position
  • Automatic Alignment: Some drives determine offset through rotation tests

Sensorless Control Techniques

Sensorless control eliminates physical position sensors by estimating rotor position from motor electrical measurements. This approach reduces cost, improves reliability by eliminating sensor failure modes, and enables control in applications where sensors cannot be practically mounted.

Back-EMF Based Methods

Permanent magnet motors generate position-dependent back-EMF:

  • Back-EMF Zero Crossing: Detect when phase back-EMF crosses zero for commutation timing
  • Integration Method: Integrate back-EMF to obtain flux linkage proportional to position
  • Speed Limitation: Back-EMF magnitude decreases with speed, limiting low-speed operation
  • Starting Challenges: Zero back-EMF at standstill prevents position detection

Observer-Based Estimation

State observers estimate position and velocity from electrical measurements:

  • Motor Model: Mathematical model predicts current response to voltage
  • Prediction Error: Difference between measured and predicted current indicates model error
  • Correction: Observer gains adjust position estimate to reduce prediction error
  • Luenberger Observer: Linear observer structure commonly used for estimation
  • Sliding Mode Observer: Robust observer with discontinuous correction term

Extended Kalman Filter

Optimal estimation technique for nonlinear motor systems:

  • State Vector: Includes position, velocity, and possibly flux or load torque
  • Prediction Step: Propagate state estimate using motor model
  • Update Step: Correct estimate using current measurements
  • Covariance Tracking: Maintain uncertainty estimates for optimal gain calculation
  • Computational Load: Requires significant processing for real-time execution

High-Frequency Injection

Inject signals to detect rotor position through magnetic saliency:

  • Saliency: Inductance variation with rotor position in IPM motors
  • HF Voltage Injection: Superimpose high-frequency voltage on fundamental
  • Current Response: Saliency creates position-dependent HF current component
  • Demodulation: Extract position information from HF current
  • Zero and Low Speed: Works at standstill where back-EMF methods fail

Hybrid Sensorless Methods

Combine techniques for full speed range operation:

  • HF Injection at Low Speed: Use injection methods from zero to transition speed
  • Back-EMF at High Speed: Switch to observer methods above transition speed
  • Smooth Transition: Blend estimators through transition region
  • Observer Initialization: Use HF estimate to initialize back-EMF observer

Sensorless Starting Methods

Techniques to start motors without initial position knowledge:

  • Open-Loop Starting: Apply rotating field with ramping frequency until synchronization
  • Pulse Injection: Apply test pulses to determine approximate position
  • I-F Control: Current-frequency control provides stable starting
  • Position Acquisition: Transition to closed-loop after position estimate converges

Sensorless Control Challenges

Practical implementation faces several difficulties:

  • Parameter Sensitivity: Estimation accuracy depends on motor parameter knowledge
  • Parameter Variation: Temperature and saturation change motor parameters
  • Measurement Noise: Current and voltage measurements contain noise affecting estimates
  • Dead-Time Effects: Inverter nonlinearities distort voltage applied to motor
  • Load Disturbances: Sudden load changes can destabilize position tracking

Current Sensing

Accurate current measurement enables torque control and provides essential information for motor protection, sensorless algorithms, and control loop operation. Current sensing in motor drives requires careful attention to bandwidth, noise immunity, and synchronization with PWM switching.

Shunt Resistor Sensing

Low-value resistors measure current through voltage drop:

  • Low Resistance: Typically 1-100 milliohms to minimize power loss
  • Power Rating: Must handle continuous I-squared-R dissipation
  • Temperature Coefficient: Low tempco resistors maintain accuracy
  • Parasitic Inductance: Four-terminal sensing minimizes inductance effects

Shunt Placement Options

Location of current shunts affects measurement characteristics:

  • DC Bus (Low-Side) Shunt: Single shunt measures total DC current, requires reconstruction
  • Phase Leg Shunts: Shunts in each inverter leg provide direct phase current
  • Inline Phase Shunts: Shunts in motor leads measure AC phase currents
  • High-Side Shunts: Measure current in positive rail, require isolated amplifiers

Current Sense Amplifiers

Specialized amplifiers condition shunt voltage signals:

  • Gain Selection: Amplify millivolt shunt signals to ADC input range
  • Bandwidth: Must capture current waveforms including PWM ripple
  • Common-Mode Range: High-side sensing requires amplifiers tolerating rail voltage
  • Offset and Drift: Low offset critical for accurate zero-current measurement
  • Settling Time: Fast settling enables sampling shortly after switching transients

Isolated Current Sensing

Galvanic isolation protects control circuits from power stage:

  • Hall Effect Sensors: Magnetic coupling provides isolation with DC capability
  • Current Transformers: AC coupling suitable for PWM current measurement
  • Isolation Amplifiers: Optically or magnetically coupled signal transmission
  • Rogowski Coils: Air-core coils measure rate of change of current

Hall Effect Current Sensors

Hall sensors measure magnetic field from current-carrying conductor:

  • Open Loop: Direct Hall measurement proportional to current
  • Closed Loop: Null-balance design improves accuracy and bandwidth
  • Core Material: Magnetic core concentrates field at Hall element
  • Bandwidth: Closed-loop types achieve 100+ kHz bandwidth
  • DC Capability: Unlike transformers, Hall sensors measure DC current

ADC Sampling Synchronization

Proper timing ensures accurate current measurement:

  • PWM Synchronization: Sample at specific points in PWM cycle
  • Center-Aligned Sampling: Sample at PWM counter center or peaks
  • Switching Transient Avoidance: Allow settling after switch transitions
  • Oversampling: Multiple samples averaged for noise reduction
  • Simultaneous Sampling: All channels sampled at same instant

DC Bus Current Reconstruction

Single shunt measurement requires signal reconstruction:

  • PWM Timing Analysis: Identify when each phase conducts through shunt
  • Minimum Pulse Width: Adequate time required for valid measurement
  • State Machine: Different PWM states determine which phase is measured
  • Phase Current Calculation: Reconstruct three phase currents from measurements
  • Limitations: Some PWM states provide insufficient measurement opportunity

Current Sensing Error Sources

Multiple factors affect current measurement accuracy:

  • Offset Errors: Non-zero output at zero current
  • Gain Errors: Scale factor deviation from nominal
  • Linearity: Non-linear response across measurement range
  • Temperature Drift: Parameter changes with temperature
  • Noise: Switching noise and EMI affect measurements
  • Bandwidth Limitations: Finite bandwidth attenuates high-frequency components

Position Estimation Algorithms

Digital signal processing algorithms transform raw sensor signals into usable position and velocity information, applying filtering, interpolation, and prediction techniques to improve accuracy and responsiveness beyond what raw measurements alone provide.

Velocity Calculation Methods

Computing velocity from position measurements:

  • Difference Quotient: Velocity = (position_new - position_old) / delta_time
  • Noise Amplification: Differentiation amplifies high-frequency noise
  • Sample Rate Trade-off: Higher rates improve response but increase noise
  • Filtered Derivative: Low-pass filter attenuates noise at expense of bandwidth

M/T Method

Combines pulse counting with period measurement:

  • Count Pulses (M): Number of encoder pulses in measurement window
  • Measure Period (T): Time for M pulses using high-resolution timer
  • Velocity Calculation: Speed = M / T provides good resolution at all speeds
  • Low Speed: Period measurement dominates for accuracy
  • High Speed: Pulse counting provides resolution

Phase-Locked Loop Tracking

PLL structures track encoder signals for smooth velocity:

  • Phase Detector: Compare encoder signal with internal oscillator
  • Loop Filter: Integrator provides velocity estimate
  • Voltage-Controlled Oscillator: Generate continuous position estimate
  • Natural Filtering: PLL bandwidth determines noise filtering
  • Interpolation: VCO provides position between encoder edges

Kalman Filtering

Optimal estimation combining measurements with dynamic model:

  • State Model: Position and velocity as state variables
  • Prediction: Propagate state based on dynamics
  • Measurement Update: Correct prediction using sensor measurement
  • Noise Modeling: Process and measurement noise covariances
  • Optimal Gain: Kalman gain minimizes estimation error variance

Observer Design

State observers estimate unmeasured quantities:

  • Velocity Observer: Estimate velocity from position without differentiation noise
  • Acceleration Estimation: Extended observer includes acceleration state
  • Load Torque Estimation: Disturbance observer estimates unknown loads
  • Gain Selection: Observer poles determine bandwidth and noise rejection

Predictive Algorithms

Compensate for measurement and computation delays:

  • Latency Sources: Sensor delay, filter delay, computation time
  • State Prediction: Project current state forward to compensate delay
  • Model-Based Prediction: Use motor model to predict future state
  • Polynomial Extrapolation: Fit polynomial to recent samples and extrapolate

Sensor Fusion

Combine multiple sensor sources for improved estimation:

  • Complementary Filter: Blend high-frequency and low-frequency sources
  • Encoder Plus Hall: Hall sensors provide absolute reference for incremental encoder
  • Redundant Sensors: Multiple sensors provide fault detection capability
  • Sensorless Backup: Switch to sensorless if sensor fails

Digital Interface Protocols

Modern position sensors increasingly use digital communication protocols that transmit position data serially, offering advantages in noise immunity, cable requirements, and integration of diagnostic information.

SSI (Synchronous Serial Interface)

Widely used protocol for absolute encoders:

  • Clock/Data Structure: Controller provides clock, encoder returns data
  • Gray Code: Position transmitted in Gray code format
  • Variable Resolution: Protocol supports different position word lengths
  • Timing Requirements: Specific clock timing ensures reliable transmission

BiSS (Bidirectional Synchronous Serial)

Enhanced protocol with bidirectional communication:

  • BiSS-B: Unidirectional mode compatible with SSI
  • BiSS-C: Bidirectional with continuous data stream
  • CRC Protection: Cyclic redundancy check detects transmission errors
  • Register Access: Read/write encoder configuration parameters

EnDat

Heidenhain protocol for high-precision encoders:

  • Bidirectional: Controller and encoder communicate in both directions
  • Position and Data: Transmit position plus additional information
  • Error Detection: CRC and alarm bits indicate problems
  • High Resolution: Support for very high resolution encoders

Hiperface

SICK STEGMANN protocol for servo feedback:

  • Combined Signals: Digital protocol on same cable as analog sine/cosine
  • Electronic Nameplate: Store motor parameters in encoder memory
  • DSL Version: Single-cable solution including power

DRIVE-CLiQ

Siemens protocol for integrated drive systems:

  • Ethernet-Based: Uses Ethernet physical layer
  • Deterministic: Guaranteed timing for real-time control
  • Component Recognition: Automatic identification of connected devices
  • Diagnostic Data: Rich diagnostic information available

Protocol Implementation Considerations

Factors affecting digital interface implementation:

  • Clock Speed: Higher clock rates enable faster position updates
  • Cable Length: Protocol and speed limit maximum cable length
  • EMC: Differential signaling improves noise immunity
  • Hardware Support: Dedicated peripherals simplify implementation
  • Software Overhead: Protocol processing consumes CPU cycles

Implementation Considerations

Practical feedback processing implementations must address real-world challenges including timing, noise, fault handling, and integration with the overall motor control system.

Timing and Synchronization

Feedback timing critically affects control performance:

  • Sample Timing: Consistent sampling intervals ensure proper control
  • PWM Synchronization: Coordinate feedback sampling with PWM generation
  • Interrupt Latency: Minimize time from sample to control action
  • Timestamp: Record precise time of each measurement

Noise Management

Motor environments create significant electrical noise:

  • Shielded Cables: Protect sensor signals from radiated emissions
  • Differential Signaling: Reject common-mode interference
  • Filtering: Analog and digital filters remove noise
  • Grounding: Proper ground topology prevents ground loops
  • Layout: Separate sensitive signal paths from power circuits

Fault Detection and Handling

Robust systems detect and respond to feedback failures:

  • Signal Validation: Check for out-of-range values
  • Sequence Checking: Verify proper signal progression
  • Rate Limiting: Detect impossibly fast changes indicating errors
  • Redundancy: Multiple sensors enable cross-checking
  • Graceful Degradation: Fall back to reduced capability on sensor failure

Calibration Procedures

Initial and periodic calibration ensures accuracy:

  • Offset Calibration: Measure and store zero-position offset
  • Gain Calibration: Adjust scale factors for measured values
  • Alignment Calibration: Determine sensor alignment relative to motor
  • Temperature Compensation: Correct for temperature-dependent variations

Software Architecture

Organize feedback processing for efficiency and maintainability:

  • Interrupt Service Routines: Handle time-critical feedback capture
  • DMA Transfers: Automate data movement without CPU intervention
  • Modular Design: Separate sensor interface from estimation algorithms
  • Configuration: Support different sensors through runtime configuration

Summary

Feedback processing provides the sensory foundation essential for precise digital motor control. From traditional sensors like encoders and resolvers to Hall effect sensors and advanced sensorless techniques, each feedback technology offers distinct characteristics suited to different applications. The choice of feedback method involves trade-offs among resolution, bandwidth, cost, reliability, and environmental robustness.

Encoder interfaces require careful attention to quadrature decoding, signal conditioning, and high-speed operation to achieve maximum resolution. Resolver-to-digital conversion demands understanding of tracking loop dynamics and synchronous demodulation techniques. Hall sensor processing, while simpler, benefits from interpolation and velocity estimation methods that extend basic functionality.

Sensorless control techniques offer compelling advantages in cost and reliability, employing observers, Kalman filters, and high-frequency injection to estimate rotor position from electrical measurements. Current sensing, critical for torque control and sensorless algorithms, requires attention to shunt selection, amplifier design, and ADC synchronization to achieve accurate measurements in electrically noisy environments.

Position estimation algorithms including filtered differentiation, M/T methods, PLL tracking, and Kalman filtering transform raw measurements into the smooth, accurate position and velocity signals required by modern control loops. Digital communication protocols enable integration of advanced sensor features while simplifying wiring and improving noise immunity.

Successful feedback processing implementation demands attention to timing, noise management, fault handling, and calibration. When properly implemented, feedback processing enables the high-performance motor control that modern applications demand, whether in industrial automation, robotics, electric vehicles, or consumer products.

Related Topics