Inferensys

Glossary

B-Spline Trajectory

A B-Spline trajectory is a piecewise polynomial curve defined by a set of control points and a knot vector, valued in robotics for its local control, smoothness, and computational efficiency in motion planning.
Engineer reviewing vector database search results on laptop, embeddings visualization on screen, home office coding session.
MOTION PLANNING

What is a B-Spline Trajectory?

A B-Spline trajectory is a piecewise polynomial curve defined by a set of control points and a knot vector, valued in motion planning for its local control, smoothness, and computational efficiency.

A B-Spline trajectory is a piecewise polynomial path defined by a set of control points and a knot vector. It is a core mathematical representation in motion planning and trajectory optimization for robots, valued for its guaranteed smoothness (C² continuity) and the local control property, where adjusting one control point only affects a local segment of the curve. This makes it ideal for iterative optimization and real-time replanning.

The trajectory's shape is determined by the Basis Spline blending functions, which weight the influence of each control point. The degree of the polynomial and the spacing of the knot vector dictate the curve's smoothness and interpolation behavior. In robotics, B-Splines are used to represent time-parameterized paths for manipulators and mobile robots, enabling efficient optimization of criteria like minimum jerk or energy while satisfying dynamic constraints and collision avoidance.

MATHEMATICAL FOUNDATIONS

Key Components of a B-Spline

A B-Spline trajectory is defined by a small set of core mathematical constructs. Understanding these components is essential for implementing and tuning them for motion planning applications.

01

Control Points

Control points are a set of points in the robot's configuration space (e.g., Cartesian space, joint space) that influence the shape of the B-Spline curve. The curve does not generally pass through these points but is "pulled" toward them. Their primary function is to provide local control; moving a single control point only affects a local segment of the curve, defined by the spline's degree. This property is crucial for real-time trajectory adjustments in dynamic environments.

  • Example: In a 2D path for a mobile robot, control points might be (x, y) coordinates. A planner can adjust a point to avoid a newly detected obstacle without recomputing the entire path.
02

Knot Vector

The knot vector is a non-decreasing sequence of real numbers that defines the parameter domain and the influence of control points. It partitions the parameter range into intervals where different polynomial basis functions are active. The spacing and multiplicity of knots determine the continuity (smoothness) of the spline at the junctions between polynomial segments.

  • Uniform vs. Non-Uniform: A uniform knot vector has equally spaced knots, simplifying computation. A non-uniform knot vector allows for uneven spacing, providing greater flexibility to model complex shapes.
  • Knot Multiplicity: Increasing the multiplicity of a knot (repeating its value) reduces the continuity at that parameter location. A multiplicity equal to the degree creates a discontinuity, which can be used to represent sharp corners or trajectory segments.
03

Basis Functions (B-Splines)

Basis functions, also called B-Splines, are the piecewise polynomial functions defined recursively by the Cox-de Boor algorithm, using the knot vector. Each control point is weighted by a corresponding basis function. The value of the trajectory at any parameter is the weighted sum of the control points, where the weights are given by these basis functions.

  • Key Property: Convex Hull & Local Support: The basis functions are non-negative and partition unity (sum to 1), ensuring the curve lies within the convex hull of its active control points. Each basis function is non-zero only over a span of degree+1 knots, enforcing local control.
04

Degree (Order)

The degree p (or order k = p + 1) of a B-Spline defines the polynomial order of its segments and its inherent smoothness. A spline of degree p is C^(p-1) continuous (has p-1 continuous derivatives) at non-repeated knots, provided the knot vector is structured appropriately.

  • Degree Selection Trade-off:
    • Low Degree (e.g., p=3, Cubic): Common choice. Provides C^2 continuity (continuous position, velocity, acceleration), which is often sufficient for smooth actuator commands. Computationally efficient.
    • High Degree (e.g., p=5): Provides higher-order continuity (e.g., continuous jerk or snap), which can be important for minimizing wear on mechanical systems or for specific dynamic constraints. Increases computational cost and reduces local control influence.
05

Parameterization

Parameterization refers to the mapping from the spline's parameter (often u in the range defined by the knot vector) to time. A uniform parameterization (where u advances linearly with time) is simple but may result in non-constant velocity along the path. For physical trajectories, a time-optimal or kinodynamic parameterization is critical.

  • Time-Optimal Parameterization: This involves solving a separate optimization problem to assign time values to each knot, subject to actuator velocity and acceleration limits. The result is a B-Spline trajectory where the derivative with respect to time (the actual robot velocity) respects dynamic constraints.
06

Derivative Properties

The derivatives of a B-Spline (velocity, acceleration, jerk) are themselves B-Splines of a lower degree. Their control points can be computed analytically from the original control points and knot vector. This is a major advantage for motion planning.

  • Efficient Constraint Enforcement: Kinodynamic constraints (e.g., max velocity v_max, max acceleration a_max) become simple bounds on the control points of the derivative splines. This allows for fast optimization where the trajectory is guaranteed to satisfy constraints everywhere, not just at sampled points.
  • Example: For a cubic B-Spline position trajectory (degree 3), the velocity is a quadratic B-Spline (degree 2). Ensuring all velocity control points have magnitude less than v_max guarantees the entire trajectory respects the speed limit.
TRAJECTORY REPRESENTATION

How B-Splines Work in Robotics Motion Planning

B-Splines are a fundamental mathematical tool for representing smooth, controllable paths for robots. This section explains their core mechanics and advantages for motion planning.

A B-Spline trajectory is a piecewise polynomial curve defined by a set of control points and a knot vector, valued in robotics for generating smooth, computationally efficient motion paths. Unlike a single high-degree polynomial, a B-Spline is constructed from multiple low-degree polynomial segments joined at knots, providing local control where adjusting one control point only affects a limited portion of the curve. This property is critical for online motion plan updates and collision avoidance.

The knot vector determines where the polynomial segments join and influences the basis functions' blending. The degree of the B-Spline dictates its smoothness, with a common choice of quintic (degree 5) to ensure continuous jerk (the third derivative of position). For planning, the control points become optimization variables. Solvers adjust them to minimize objectives like time or energy while satisfying constraints on dynamics, actuator limits, and collision avoidance via a signed distance field, producing a physically feasible trajectory.

ENGINEERING PROPERTIES

Advantages and Common Applications

B-Spline trajectories are favored in robotics and motion planning for their unique mathematical properties, which translate to practical engineering benefits for control systems.

01

Local Control & Editability

A defining advantage of B-Splines is local control. Modifying a single control point only affects the curve within a limited range defined by the basis functions and knot vector. This is critical for:

  • Online trajectory repair: Adjusting a path segment to avoid a newly detected obstacle without recomputing the entire trajectory.
  • Interactive design: Allowing engineers to fine-tune specific sections of a motion path for precision tasks.
  • Real-time adaptation: Enabling dynamic systems to modify their planned motion locally in response to disturbances.
02

Guaranteed Smoothness (C^k Continuity)

B-Splines provide mathematically guaranteed smoothness. A B-Spline of degree p has continuous derivatives up to order C^{p-1}. This is essential for physical systems where jerk (the derivative of acceleration) must be bounded.

  • High-degree continuity: A cubic B-Spline (degree 3) guarantees continuous acceleration (C^2), producing smooth velocity profiles.
  • Actuator and passenger comfort: Minimizes vibrations and sudden forces on mechanical joints and passengers in autonomous vehicles.
  • Energy efficiency: Smooth trajectories typically require less peak torque and power from motors.
03

Convex Hull Property & Safety

The convex hull property ensures the entire B-Spline curve lies within the convex hull of its control points. This enables efficient and conservative collision checking.

  • Fast feasibility checks: By verifying that the convex hull of a subset of control points is collision-free, you can guarantee the corresponding curve segment is safe, without evaluating every point on the curve.
  • Conservative corridor generation: Control points can be placed inside a verified safe corridor, ensuring the resulting trajectory remains within it.
  • Integration with sampling-based planners: Paths from planners like RRT* can be represented as sequences of control points whose convex hulls are known to be in free space.
04

Computational Efficiency for Optimization

B-Splines provide a compact, differentiable parameterization ideal for trajectory optimization and Model Predictive Control (MPC).

  • Low-dimensional parameterization: A long, complex curve is defined by a relatively small set of control points, reducing the number of decision variables in optimization.
  • Analytic derivatives: Costs and constraints based on position, velocity, and acceleration can be computed efficiently as linear combinations of control points and basis function derivatives.
  • Real-time solvers: This efficiency enables the use of Nonlinear Programming (NLP) solvers within the tight control loops of real-time robotic control systems.
05

Common Application: CNC Machining & Robotic Milling

In Computer Numerical Control (CNC) and robotic milling, B-Splines are the standard for defining complex toolpaths.

  • Smooth surface finishing: The high continuity eliminates machine tool vibrations, producing superior surface quality on manufactured parts.
  • Compact G-code: Modern CNC standards (e.g., NURBS, a generalization of B-Splines) allow dense toolpath contours to be transmitted with few control points, reducing program size.
  • Precise cornering: Allows for blended cornering, where the tool smoothly rounds a sharp programmed corner at a controlled tolerance, reducing wear and cycle time.
06

Common Application: Autonomous Vehicle & UAV Trajectories

B-Splines are extensively used for planning smooth, drivable paths for autonomous ground vehicles (AGVs) and unmanned aerial vehicles (UAVs).

  • Dynamic feasibility: The smoothness directly relates to bounded curvature and derivatives, ensuring the trajectory respects the vehicle's nonholonomic constraints and actuator limits.
  • Local replanning: The local control property allows the vehicle's local planner to quickly adjust the upcoming path segment when reacting to pedestrians or other dynamic obstacles.
  • Formation control: For multi-robot coordination, B-Spline trajectories provide a shared parameterized path that individual agents can track with offset, maintaining fleet shape.
COMPARISON

B-Spline vs. Other Trajectory Representations

A technical comparison of B-Spline trajectories against other common mathematical representations used in motion planning and trajectory optimization for robotics.

Feature / MetricB-SplinePolynomial (e.g., Quintic)Piecewise Linear (e.g., Waypoints)Minimum Jerk (Analytical)

Mathematical Form

Piecewise polynomial defined by control points and knot vector

Single global polynomial function

Linear interpolation between discrete points

Closed-form polynomial minimizing jerk integral

Local Control

Continuity Guarantee

C^(k-1) (where k is order)

C^∞ (infinitely differentiable)

C^0 (position only)

C^2 (acceleration)

Computational Cost for Evaluation

O(k) via de Boor algorithm

O(d) for degree-d polynomial

O(1) for linear segment

O(1) for closed-form

Computational Cost for Optimization

Medium (optimize control points)

High (high-degree polynomials are ill-conditioned)

Low (optimize waypoints directly)

Low (solve linear system for coefficients)

Ease of Adding Constraints

Medium (constraints on control points)

Low (global constraints affect entire curve)

High (constraints directly on waypoints)

Low (primarily boundary conditions)

Smoothness of Higher Derivatives

Controlled, but piecewise

Very smooth

Not smooth (derivatives undefined at knots)

Optimal smoothness for jerk

Real-Time Replanning Suitability

High (local control enables fast updates)

Low (global change required)

High (easy to insert/remove points)

Low (requires full re-solve)

Typical Use Case

General smooth trajectory planning, local obstacle avoidance

Simple, short-duration motions with smoothness priority

Grid-based planning, raw path output from planners

Biologically-inspired arm movement, comfort-critical paths

B-SPLINE TRAJECTORY

Frequently Asked Questions

A B-Spline trajectory is a fundamental tool in robotics for generating smooth, computationally efficient motion paths. This FAQ addresses common technical questions about its definition, advantages, and implementation in motion planning systems.

A B-Spline trajectory is a piecewise polynomial curve defined by a set of control points and a knot vector, valued in robotics and motion planning for its properties of local control, guaranteed smoothness, and computational efficiency. Unlike a single high-degree polynomial, a B-Spline is constructed from multiple low-degree polynomial segments (typically cubic) joined at parameter values called knots. The curve is influenced only by a local subset of control points, meaning adjusting one point modifies only a portion of the trajectory. This makes B-Splines exceptionally well-suited for real-time trajectory optimization and reactive planning, as local adjustments for obstacle avoidance do not require recomputing the entire path.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.