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.
Glossary
B-Spline Trajectory

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.
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.
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.
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.
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.
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+1knots, enforcing local control.
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^2continuity (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.
- Low Degree (e.g., p=3, Cubic): Common choice. Provides
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.
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 accelerationa_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_maxguarantees the entire trajectory respects the speed limit.
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.
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.
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.
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.
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.
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.
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.
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.
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 / Metric | B-Spline | Polynomial (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 |
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
B-Spline trajectories are a core mathematical tool for generating smooth motion. Understanding these related concepts is essential for implementing robust robotic planning and control systems.
Minimum Jerk Trajectory
A minimum jerk trajectory is a path that minimizes the integral of the squared magnitude of the third derivative of position (jerk) over time. This optimization criterion produces exceptionally smooth, human-like motions that are comfortable for passengers and reduce mechanical stress on robotic joints.
- Mathematical Basis: Formulated as a boundary value problem, often solved via Pontryagin's maximum principle or direct collocation methods.
- Common Use: Widely used for robotic arm trajectories and autonomous vehicle lane-change maneuvers where passenger comfort is paramount.
- Comparison to B-Spline: While a B-Spline can represent a smooth path, a minimum jerk trajectory is defined by a specific optimality criterion. A B-Spline can be optimized to approximate a minimum-jerk path.
Trajectory Optimization
Trajectory optimization is the mathematical framework for finding a sequence of states and control inputs that minimizes a cost function (e.g., energy, time, jerk) while satisfying dynamic constraints and avoiding obstacles. It transforms a motion planning problem into a numerical optimization problem.
- Core Methods: Includes direct methods (shooting, collocation) and indirect methods.
- Role of B-Splines: B-Splines are frequently used as the parameterization for the trajectory in optimization. The control points become the decision variables optimized by the solver.
- Key Challenge: Balancing computational speed with solution feasibility and optimality, especially in real-time applications like Model Predictive Control (MPC).
Nonlinear Programming (NLP)
Nonlinear Programming (NLP) is the process of solving an optimization problem where the objective function or some of the constraints are nonlinear. It forms the mathematical and computational backbone for solving trajectory optimization problems.
- Connection to Planning: When a B-Spline trajectory is optimized for smoothness or dynamic feasibility, the resulting problem is typically an NLP.
- Common Solvers: IPOPT, SNOPT, and CasADi are standard tools for solving the NLPs generated in robotics.
- Problem Structure: Constraints include collision avoidance (nonlinear inequality), dynamics equations (nonlinear equality), and actuator limits (bound constraints).
Model Predictive Control (MPC)
Model Predictive Control (MPC) is an advanced, real-time control method that repeatedly solves a finite-horizon trajectory optimization problem. It uses an internal dynamic model to predict future system behavior and applies only the first control input from the optimized sequence before re-planning.
- Real-Time Trajectory Generation: MPC inherently performs online trajectory optimization. B-Splines are often used within the MPC formulation to parameterize the predicted state or control trajectory.
- Key Advantage: Explicitly handles state and input constraints (e.g., velocity limits, obstacle boundaries).
- Computational Demand: Requires fast, reliable NLP solvers to complete optimization within the control loop's timeframe (often milliseconds).
Spline Parameterization
Spline parameterization refers to the use of piecewise polynomial functions (splines) to represent continuous paths or trajectories with a finite set of parameters (e.g., control points, knots). It is a foundational technique for making continuous optimization problems tractable.
- Types of Splines: Includes B-Splines, Bezier curves, NURBS (Non-Uniform Rational B-Splines), and cubic splines.
- Why Parameterize?: Converts an infinite-dimensional search space (all possible continuous curves) into a finite-dimensional one, enabling numerical optimization.
- B-Spline Advantages: Offers local control (moving a control point affects only a local curve segment) and built-in smoothness (C^(k-2) continuity for order k), which simplifies constraint formulation.
Collision Avoidance Constraints
Collision avoidance constraints are mathematical conditions enforced during motion planning or trajectory optimization to ensure a robot's path does not intersect with obstacles. For B-Spline trajectories, these constraints must be evaluated along the continuous curve.
- Common Representations: Obstacles are often represented as convex shapes, polyhedra, or implicit functions via Signed Distance Fields (SDF).
- Constraint Formulation: For a B-Spline path
p(t), a simple constraint isSDF(p(t)) > safety_marginfor allt. In practice, this infinite set of constraints is sampled or bounded. - Efficient Evaluation: The convex hull property of B-Splines can be used to conservatively check for collisions by examining the convex hull of a subset of control points, speeding up planning.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us