Skip to the lesson
FixTheRobot Explore Robotics / Guidance, Navigation and Control / M1 The GNC Problem / M1-T1

Guidance, Navigation and Control · Theory · M1

M1-T1 — Three Questions: Where Am I, Where Should I Go, How Do I Get There

Every vehicle that moves by itself runs the same loop: estimate where it is, decide where to go, and make the vehicle do it.

  • Lesson 1 of 4
  • Beginner
  • Module 1: The GNC Problem
  • Theory
  • About 16 minutes to read

A rocket lander touches down four metres from its pad. Was a sensor wrong, was the plan wrong, or did the engine control fall short? Without words that separate the three, the question cannot even be asked. With them it can often be answered in a minute from a flight log. This lesson fixes the vocabulary that every later module uses: three blocks, the signals between them, and one identity that says how a final miss splits into one term per block.

Learning objectives

After this lesson, you should be able to:

  • State the question that navigation, guidance and control each answer.
  • Name the signals that pass between the blocks, with their symbols and units.
  • Explain why the word navigation means different things in aerospace and in ground robotics, and use the aerospace meaning.
  • Show that a final miss is the sum of one guidance term, one control term and one navigation term.

The intuition

Meet Hopper, the vehicle that carries this course. It is a small rocket lander on a test range: one gimballed engine, an inertial measurement unit (accelerometers and gyroscopes), an altimeter and radio range beacons around the range. Its job is a hop: lift off from the launch pad, fly 100 m downrange, and land on a target pad. Nothing about this job is special to rockets. A delivery drone, a ship docking, an aircraft on approach and a satellite pointing at a ground station all do the same three things.

  1. Navigation answers where am I, and how am I moving? It turns raw sensor readings into an estimate of the vehicle's state: position, velocity, attitude and their rates.
  2. Guidance answers where should I go, and what should I ask for next? It turns the estimated state and the target into a command: a point to reach, a velocity to hold, a direction to point.
  3. Control answers how do I make the vehicle do that? It turns the command and the estimate into actuator signals: a gimbal angle, a throttle setting, a wheel torque.

The vehicle itself closes the loop. Its actuators move it, its sensors observe the result, and navigation turns the observations into the next estimate.

The guidance, navigation and control loopThe loop used in every lesson of the course: mission and target into guidance, command r into control, actuator command u into the vehicle, truth x observed by sensors, measurement z into navigation, estimate x-hat back to guidance and control. GuidanceWhere should I go?ControlHow do I get there?VehicleActuators and dynamics NavigationWhere am I?SensorsWhat I can measure target, mission r u x (truth) z x̂ x̂ d (wind, load, model error) v (sensor noise)
The loop of every lesson in this course. The orange arrows are what the designer cannot choose: disturbances that push the vehicle (d) and noise in the sensors (v). Later lessons colour the block they are about.

Look at which arrows carry estimates and which carry truth. Guidance and control never see the true state x. They see x̂, the navigation block's best guess. Everything that follows in this course is, in one way or another, a consequence of that drawing.

Three blocks, three kinds of mathematics

The split is not only tidy, it matches how the work is done. Navigation is estimation: it combines noisy measurements with a model of motion, and its mathematics is probability and filtering. Control is feedback: it makes a dynamic system follow a command despite disturbances, and its mathematics is stability and the frequency response. Guidance is geometry and optimization: it decides what to ask for given where the vehicle is and what it wants, and its mathematics is relative motion and optimal control. Different engineers usually own the three, and each can be tested alone: navigation against recorded sensor data, control against a simulated vehicle, guidance against a simulated target.

The blocks of the loop, the question each answers and its signals
BlockQuestionTakes inProducesOn Hopper
NavigationWhere am I and how am I moving?Sensor measurements, the last commandsState estimate and its uncertaintyIMU, altimeter and beacon ranges become position, velocity and pitch
GuidanceWhere should I go, what should I ask for?Estimate, target, constraintsCommand: position, velocity or attitude to achieveLateral position and altitude profile for the hop and the descent
ControlHow do I make the vehicle do it?Command, estimateActuator signalsGimbal angle and throttle
VehicleWhat happens when I push?Actuator signals, disturbancesMotion (the true state)Rigid body under gravity, thrust and wind

The blocks are not always separate programs. A predictive controller can compute a trajectory and the actuator signals in one optimization, and a missile autopilot is often designed together with its guidance law. The separation is a way of thinking that survives such mergers: even when one program does two jobs, you can still ask which job went wrong.

Two meanings of the word navigation

Ground robotics and aerospace use the word differently, and a reader of both will meet the clash. On this site's Navigation track, navigation means getting a mobile robot from A to B: maps, planners, obstacle avoidance. In aerospace, and in this course, it means only the estimation question: where am I? What the ground-robot community calls navigation is roughly this course's navigation plus its guidance plus some route planning. Neither use is wrong. When a page says navigation, check which one it means.

Planning also needs a place in this vocabulary. Choosing a route through a building, ordering ten delivery stops or finding a path around obstacles are decisions over long horizons and discrete choices. They sit above guidance, which works continuously in real time on the path or target it is handed. The Navigation track teaches that planning, and this course starts where it ends.

Navigation says where the vehicle is. Guidance says where it should be next. Control makes it so. The first and the third work from the estimate, never from the truth.

Definitions

State xx
The true condition of the vehicle: position (m), velocity (m/s), attitude (rad) and angular rates (rad/s). Never observed directly.
Control input uu
What the actuators are told to do: gimbal angle (rad), throttle (0 to 1), wheel torque (N m).
Disturbance dd
Forces the designer does not command: wind, payload change, model error. Unknown in flight.
Measurement zz
What the sensors report, with noise vv. A function of the state, not the state.
Estimate x^\hat{x}
Navigation's best guess of the state. Its error is ε=x^−x\varepsilon = \hat{x} - x, the same sign convention as in Probability for Robotics.
Command rr
What guidance asks the controller to achieve, in the same units as the state it refers to (a position, a velocity, an attitude).
Target pTp_T
Where the mission wants the vehicle to end: a pad position, a waypoint, an orbit.

With these symbols each block is one equation. The vehicle and its sensors are the physical part:

Vehicle and sensors
x˙=f(x, u, d)z=h(x)+v\dot{x} = f(x,\,u,\,d) \qquad z = h(x) + v
ff is the motion of the vehicle (module 2 writes it for Hopper). hh says what a sensor measures. The dot is the derivative with respect to time.

The three blocks you design are:

Navigation
x^k=N(x^k−1, uk−1, zk)\hat{x}_k = N(\hat{x}_{k-1},\,u_{k-1},\,z_k)
A recursive estimate: the new estimate combines the previous estimate, the last command and the newest measurement. Modules 6 and 7 are about NN.
Guidance
r=G(x^, pT)r = G(\hat{x},\,p_T)
From the estimated state and the target to a command. Modules 8 and 9 are about GG.
Control
u=C(r, x^)u = C(r,\,\hat{x})
From the command and the estimated state to actuator signals. Modules 3 to 5 are about CC.

Notice the arguments. Neither GG nor CC contains xx. This is the most important fact of the loop, and the next section shows what it costs.

Derivation: where a miss comes from

Suppose Hopper is ordered to land on a pad at position pTp_T, and ends its flight at x(T)x(T) at touchdown time TT. The miss is x(T)−pTx(T) - p_T. Which block caused it? Work along one axis. Three small, honest facts about the blocks are enough.

  1. x^=x+ε\hat{x} = x + \varepsilon

    This is the definition of the estimation error. The controller sees the left side, the world is the right side without the error.

  2. x^(T)=r(T)+c\hat{x}(T) = r(T) + c

    A controller can only compare the estimate with the command. The most it achieves is to bring them together, up to a leftover cc (a lag, a saturated actuator, a gain that was too low). Call cc the control error. It is visible to the controller.

  3. r(T)=pT+gr(T) = p_T + g

    Guidance ends its command at the target plus an error gg of its own: a stale target, a wrong coordinate frame, a terminal condition that was never reachable. Call gg the guidance error.

  4. x(T)−pT=x^(T)−ε−pTx(T) - p_T = \hat{x}(T) - \varepsilon - p_T

    Rearrange the first line to get the truth, x=x^−εx = \hat{x} - \varepsilon, and subtract the target.

  5. x(T)−pT=(r+c)−ε−pT=g+c−εx(T) - p_T = (r + c) - \varepsilon - p_T = g + c - \varepsilon

    Substitute the second line for x^(T)\hat{x}(T), and then the third for r(T)−pTr(T) - p_T. The miss is one term per block.

The last line is the only equation of this lesson that you must remember. It has three consequences.

  • Control cannot remove the navigation error. Even with perfect guidance (g=0g = 0) and a perfect controller (c=0c = 0) the vehicle misses by −ε-\varepsilon. It lands exactly where it believes the pad is, and the belief is wrong.
  • The three errors can be separated only with the truth. The controller sees cc and guidance sees nothing, but ε\varepsilon is the difference from a quantity that no on-board block has. Test ranges therefore record the truth separately: a surveyed marker, a motion-capture system, a simulator that owns the true state.
  • The same miss has different cures. A miss of 4 m can come from any of the three terms, and the fix for each lives in a different block and in a different team.

The estimate, not the truth, closes the loop. A vehicle can only be as accurate as its navigation, and no amount of control quality can buy that back.

Lesson M1-T4: From Mission Requirement to GNC Budget turns this identity into a budget: it gives each term a size and combines them.

A worked example

Hopper flew three test flights, each ending about 4 m from a pad at 100.0 m along the range. The test range logs, for each flight, the final command rr, the final estimate x^\hat{x} and the true final position xx from a surveyed marker. Which block do you send each flight to?

  1. Record three numbers per flight. Flight A: r=100.0r = 100.0, x^=100.2\hat{x} = 100.2, x=96.2x = 96.2 (metres). Flight B: 104.0, 104.1, 104.0. Flight C: 100.0, 96.1, 96.0.
  2. Compute the four quantities. The miss is x−pTx - p_T. The three terms are g=r−pTg = r - p_T, c=x^−rc = \hat{x} - r and ε=x^−x\varepsilon = \hat{x} - x.
  3. Check the identity. For flight A the miss is 96.2−100.0=−3.896.2 - 100.0 = -3.8 and g+c−ε=0.0+0.2−4.0=−3.8g + c - \varepsilon = 0.0 + 0.2 - 4.0 = -3.8. The program below asserts that this holds for every flight.
  4. Read the dominant term. Flight A: the estimate is 4.0 m ahead of the truth. Hopper flew to where it thought the pad was, and the fault is in navigation (a beacon coordinate error, a bad altimeter bias). Flight B: the command itself ended 4.0 m from the pad and everything downstream was accurate, so the fault is in guidance (a stale target, a coordinate frame mix-up). Flight C: the command and the estimate were right, but the vehicle was left 3.9 m short of the command, so the fault is in control (a saturated gimbal, too little gain).
  5. Note what the control engineer would have seen. Looking only at on-board data, flights A and B look like good flights: the estimate ended on or next to the command. Only flight C looks bad from inside. That is why ε\varepsilon and gg hide from the controller and need the truth to find.

The same bookkeeping as a program. It uses only the Python standard library, and the site's tests run it and compare its output with the output below.

PAD = 100.0   # position of the pad along the range (m)

flights = {
    # name: (final command r, final estimate x_hat, true final position x), all in metres
    'A': (100.0, 100.2, 96.2),
    'B': (104.0, 104.1, 104.0),
    'C': (100.0, 96.1, 96.0),
}

for name, (r, x_hat, x) in flights.items():
    miss = x - PAD       # what happened
    g = r - PAD          # guidance: where the command ended, relative to the pad
    c = x_hat - r        # control: how far the estimate was left from the command
    e = x_hat - x        # navigation: estimate minus truth
    assert abs(miss - (g + c - e)) < 1e-9
    terms = {'guidance': g, 'control': c, 'navigation': e}
    culprit = max(terms, key=lambda k: abs(terms[k]))
    print(f'flight {name}: miss {miss:+.1f} m = guidance {g:+.1f} + control {c:+.1f} - (navigation {e:+.1f})  -> {culprit}')
flight A: miss -3.8 m = guidance +0.0 + control +0.2 - (navigation +4.0)  -> navigation
flight B: miss +4.0 m = guidance +4.0 + control +0.1 - (navigation +0.1)  -> guidance
flight C: miss -4.0 m = guidance +0.0 + control -3.9 - (navigation +0.1)  -> control
The sign of the navigation term is subtracted, as in the identity: an estimate that is too far ahead puts the vehicle short.

Lab M1-L1: Who Missed the Pad? gives you the same three logs for a longer flight and asks you to name the block before you look at any plot.

In robotics

The loop is easy to find in real systems once you know what to look for. The names change, the questions do not.

The loop on four real systems
SystemNavigationGuidanceControl
A PX4 multicopterThe EKF2 estimator turns IMU, barometer, magnetometer and GNSS data into position, velocity and attitudeThe mission and position-setpoint logic: waypoints become position and velocity setpointsThe velocity, attitude and rate controllers, down to motor outputs
The Apollo lunar moduleAn inertial platform and a computer, aided by landing radar, kept the state vectorGuidance equations in the computer commanded thrust level and attitude during descentThe digital autopilot carried the commands out with the reaction-control jets and engine gimbal trim
A wheeled robot running Nav2Localization against a map (for example AMCL) with wheel odometryThe planner and the path-following controller choose velocity commands along the routeThe base controller turns velocity commands into wheel speeds
A fixed-wing autopilotAttitude, position and airspeed estimationPath following, glide-slope and altitude and speed holdRate and attitude loops on elevator, aileron, rudder and throttle

Two practical habits follow from this lesson.

  • Log the interface signals. The command rr, the estimate x^\hat{x} and, wherever you can get it, the truth xx, are the three signals that let you split a miss into its three terms. Autopilot logs usually carry the setpoints and the estimator outputs; see UAV M6-T13: Flight logs and debugging for how to read them. A project that logs only the actuator outputs cannot tell navigation from guidance.
  • Separate the blocks for testing. Run control on a simulated vehicle with the true state as input to see what the loop could do with perfect navigation. If the miss disappears, navigation is the problem. The same trick, turned the other way, isolates guidance.

The UAV track has already shown these blocks for a multirotor: UAV M5-T15: Guidance and control integration looks at the hand-overs between them, and UAV M6-T5: PX4 state estimation and EKF2 at the navigation block of PX4. The Navigation track's The Navigation Stack at a Glance draws the same chain for a ground robot, with planning added on top. This course goes under all three of those pages.

Common misconceptions

“Navigation means finding a route.”

In ground robotics it often does, and that usage is fine on its own site. In aerospace, and in this course, navigation is the state estimate: where am I and how am I moving. Route finding is planning, and a mission that needs it hands the result to guidance as a path or a list of targets.

“Guidance and control are the same thing: the controller steers the vehicle.”

They answer different questions. Guidance decides what to ask for (reach this point at this speed), control decides how (which actuator moves, by how much). A good test: could the same guidance law fly a different vehicle if only the controller changed? A pursuit law can steer a car, a boat or a missile. The controller cannot be moved between them.

“A perfect controller gives a perfect landing.”

The derivation shows the miss is g+c−εg + c - \varepsilon, and a perfect controller only removes cc. If navigation believes the pad is 4 m from where it is, the vehicle lands exactly on the wrong spot, and the controller reports a flawless flight.

“Navigation is GPS.”

GNSS is one aiding source among many. Navigation is the whole estimation block: it also uses inertial sensors, altimeters, air data, star trackers, cameras and LiDAR, and combines them. Inertial navigation works with no outside signal at all (module 6), and a GNSS receiver alone gives positions at a few hertz with noise, not an estimate of attitude and rates.

“The three blocks are always three separate programs.”

Often they are merged: model predictive control computes commands and actuator signals together, and some missile designs treat guidance and autopilot as one loop. The three questions still exist when the code is one program, and asking them is how you find which part failed.

Key takeaways

  1. Navigation estimates the state, guidance decides what to ask for, and control makes the vehicle do it. The vehicle and its sensors close the loop.
  2. Guidance and control work from the estimate x^\hat{x}, never from the true state xx.
  3. The miss at the end of a flight is g+c−εg + c - \varepsilon: one guidance term, one control term and one navigation term.
  4. Control cannot repair a wrong estimate. A vehicle lands where it believes the target is.
  5. Splitting a miss into its three terms needs the command, the estimate and the truth to be logged, so a test range records all three.
  6. Aerospace navigation means estimation only. Ground robotics often uses the word for the whole job of getting from A to B.

References and further reading

Each source is marked free or paid. Free to read does not mean free to reuse: the course resources page lists every source with its licence.

Knowledge check

Three questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

A multirotor flies a waypoint mission and lands 2 m east of the last waypoint. The log shows the commanded position equal to the waypoint, an estimated position within 5 cm of the command, and a surveyed marker that puts the vehicle 2 m east of the waypoint. Which block is at fault, and what is the value of the estimation error ε = x̂ − x (east positive, waypoint at 0)?

Explanation

Navigation. The command ended at the waypoint, so guidance is fine (g ≈ 0), and the estimate ended within 5 cm of the command, so control did its job (c ≈ 0.05 m). The truth is +2 m, so ε = x̂ − x ≈ 0 − 2 = −2 m: the estimate is 2 m west of the truth, and the miss g + c − ε = 0 + 0.05 + 2 ≈ +2 m agrees with what the marker shows. The vehicle flew accurately to a place that was not where it believed it was.

Question 2

After a failed landing the controller team retunes the gimbal loop and reports that “control error is now zero”. The next flight has g = +0.1 m, c = 0 and ε = +3.5 m. What is the miss, and was the retuning the right thing to work on?

Explanation

The miss is g + c − ε = 0.1 + 0 − 3.5 = −3.4 m, so the vehicle still lands 3.4 m short. Retuning the controller removed a term that was already small: control was not what produced the miss in the first place. The dominant term is navigation, so the next effort belongs in the estimator or the sensors. Looking at the controller alone cannot reveal this, because the controller sees c, which is zero in both the good and the bad flight.

Question 3

Give one example of a system in which guidance and control are computed by a single algorithm, and say what the designer loses in diagnosing a bad flight.

Explanation

Model predictive control: one optimization over a horizon finds the future trajectory (the guidance job) and the actuator signals that follow it (the control job) together. What is lost is the clean interface r between the blocks, so a bad landing no longer separates into g and c by reading two logs. The remedy is to log the predicted trajectory the optimizer planned as well as the actuator signals, so you can still ask whether the plan was wrong or the execution was.

What’s next

Practice this lesson

Who Missed the Pad?

Hopper lands 4 m from its pad in three different flights. From the logged truth, estimate and command signals, decide in each flight whether navigation, guidance or control is responsible.

Next lesson

M1-T2 — Nested Loops and Separation of Timescales

Order the loops of a vehicle by bandwidth, state the rule of thumb for their separation, and predict what fails when an outer loop is as fast as an inner one.

Nothing below is required to finish this lesson.

  • Lab
    M1-L1: Who Missed the Pad?

    Hopper lands 4 m from its pad in three different flights. From the logged truth, estimate and command signals, decide in each flight whether navigation, guidance or control is responsible.

Other courses on this site treat neighbouring topics from their own angle:

This course leaves the following to the pages that already teach them: