Return
Root Locus and Bode Plot Generator

Saved Results

Your work saves automatically in this browser (local storage). Use Load to reopen a result or Delete to remove one. Download All saves a ZIP with one subfolder per result, containing the files you pick below.

    Save Options

    Include in each result's folder

    Options are remembered in this browser. Download All makes folder-name.zip containing folder-name/01-result-name/, 02-result-name/, and so on.

    Entering a Transfer Function

    Type the coefficients of the numerator and the denominator of G(s), highest power of s first, separated by spaces or commas. Decimals and scientific notation such as 2.5 or 1e-3 are accepted. For example, G(s) = 1 / (s³ + 6s² + 8s) has numerator 1 and denominator 1 6 8 0. The line under the input boxes shows the polynomial you entered so you can check it before plotting.

    Every power of s down to s⁰ needs a coefficient, so write 0 for any missing power: s² + 1 is 1 0 1 and s³ + 4s is 1 0 4 0. If your function is factored, multiply it out first. For G(s) = 10 / ((s + 1)(s + 5)), the denominator expands to s² + 6s + 5, so enter numerator 10 and denominator 1 6 5. A constant gain in front belongs in the numerator. The transfer function must be proper, meaning the numerator degree cannot exceed the denominator degree, and time delays (e-sT) are not supported because they are not rational polynomials.

    Optional Settings

    Leave Max gain K blank and the page picks a range that carries the branches well past the interesting region. Type a value to zoom the root locus in or out. Min and Max freq set the Bode range in rad/s; blank values are chosen from the pole and zero locations, about one decade beyond the outermost corners. Show closed-loop poles at K drops red dots on the root locus at the closed-loop pole locations for that single gain and reports whether they are stable.

    The loop assumed everywhere is negative unity feedback around K·G(s), so the closed-loop poles are the roots of 1 + K·G(s) = 0 and K is never negative. If your system has a different feedback path, fold it into G(s) first by multiplying the plant by the sensor or feedback dynamics.

    Reading the Results

    • Summary table lists the transfer function, every open-loop pole and zero, the gain and phase crossover frequencies and margins, the critical gain K at which the locus first reaches the imaginary axis, and, if you entered a K marker, the closed-loop poles at that gain. Use the CSV, JSON or TXT buttons above it to download the table.
    • Root locus: x marks poles, o marks zeros, and each colored curve is one closed-loop pole as K grows. Curves in the right half-plane mean an unstable closed loop. Hover (or tap) a pole or zero to read its location, natural frequency and damping ratio, or hover anywhere on a branch to read the gain K and pole location at that point.
    • Bode plot: the dashed lines are 0 dB and −180°. Red dots mark the gain crossover frequency, the phase crossover frequency and the margins read there. Hover over either graph to read the frequency (in rad/s and Hz), the magnitude (in dB and as a plain ratio) and the phase at that point. A margin shows N/A if its crossing falls outside the plotted frequency range.

    Autosave, Loading and Deleting

    Every time plots are generated, and shortly after you stop typing, the current entry is saved automatically to the Saved Results list at the bottom of the page. Editing an entry you loaded updates that same entry instead of adding a copy. Press New Entry to start a fresh one without touching what is saved. The page also reopens on the entry you were last working on.

    In Saved Results, Load puts an entry back into the form and redraws its plots, and Delete removes it. Saved results live only in this browser on this device, and clearing site data erases them, so use Download All now and then to keep a copy. Clear All deletes every saved result from this browser.

    Downloading Plots and Data

    Every chart and table has its own download buttons. PNG saves a sharp image (white background, 2000 pixels wide), and SVG saves a vector version that stays sharp at any size and opens in a browser or an editor such as Inkscape. The Bode image stacks the magnitude and phase graphs. CSV and JSON save every plotted point so you can graph the data yourself: the root locus file has one row per gain K with a real and imaginary column for every branch, and the Bode file has frequency in rad/s, magnitude in dB, the plain magnitude ratio and unwrapped phase in degrees.

    Download All and Save Options

    Download All builds one ZIP file with a main folder and a numbered subfolder for each saved result. Each subfolder can hold a root locus image, a Bode image, the root locus data, the Bode data and the summary table. Use the Save Options panel under Saved Results to choose which of those to include, the image format (PNG or SVG), the image resolution up to 4000 pixels wide, whether images use a white background or the current theme, the data and table file formats (CSV, JSON or TXT) and the name of the main folder. Your choices are remembered in this browser.

    A Short History of Control Systems

    Feedback control is much older than the mathematics for it. Greek engineers in the third century BC and the first century AD built float-valve regulators to keep water clocks and tanks at a steady level, and in the early 1600s Cornelis Drebbel built a furnace temperature regulator that used a valve on the flue. In the late 1780s a centrifugal governor was applied to James Watt's steam engine, using spinning weights to hold its speed steady as the load changed.

    The first mathematical analysis came in 1868, when James Clerk Maxwell studied governor dynamics in his paper “On Governors” and showed how lags in a feedback loop can produce self-oscillation. Edward Routh won the Cambridge Adams Prize in 1877 for his work on stability, and Adolf Hurwitz published a version of the same criterion in 1895, later shown to be equivalent. Aleksandr Lyapunov's work in the 1890s opened the general theory of stability. [Lund University, Bissell History of Automatic Control] [Wikipedia, Control Theory]

    The Frequency-Domain Era

    In 1922 Nicolas Minorsky published a theoretical analysis of automatic ship steering that led to what is now called PID control. In 1927 Harold Black conceived the negative feedback amplifier at Bell Labs, trading raw gain for lower distortion, but such amplifiers tended to oscillate. Harry Nyquist answered with his frequency-domain stability criterion in 1932, and in 1934 Black published his feedback amplifier paper while Hazen summarized servomechanism theory.

    Hendrik Bode, also at Bell Labs, turned these ideas into practical design tools in the late 1930s and 1940s with the plots and stability margins that carry his name. World War II then drove the field forward, because anti-aircraft fire control needed radar data fed through servomechanisms to aim guns accurately, and the engineers who built these systems formed much of classical control theory. [Lund University, Bissell History of Automatic Control] [Wikipedia, Hendrik Wade Bode]

    Root Locus and Modern Control

    Toward the end of the 1940s Walter Evans introduced the root locus method, which showed designers where closed-loop poles go as gain changes. The same year, 1948, Norbert Wiener's book Cybernetics brought feedback and communication in machines and living things to a wide audience. These methods all described a system through its input and output behavior.

    In 1960 Rudolf Kalman presented a general theory built on state-space models at the IFAC congress in Moscow, introducing ideas such as controllability and observability and the Kalman filter, and laying the groundwork for optimal control. Today classical tools, including the root locus and Bode plots on this page, are still taught first and used daily to design and check controllers for everything from motor drives and power supplies to aircraft, and they remain the foundation for the modern methods built on top of them. [Lund University, Bissell History of Automatic Control] [Wikipedia, Control Theory]

    What the Root Locus Shows

    When a gain K is placed in a feedback loop around a system G(s), the closed-loop poles are the roots of the characteristic equation 1 + K·G(s) = 0. The root locus is the path those roots trace in the complex plane as K increases from zero to infinity. At K = 0 the closed-loop poles sit exactly on the open-loop poles, and as K grows each one moves toward an open-loop zero or off toward infinity along an asymptote.

    Pole positions translate directly into behavior. A pole farther left responds faster, a pole with a large imaginary part rings at that frequency, the ratio of the imaginary part to the real part sets the damping, and any pole with a positive real part makes the closed loop unstable. Reading the locus therefore tells you at a glance how speed, overshoot and stability change as you turn the gain up.

    History of the Root Locus

    Walter R. Evans invented the root locus method in 1948. By one account of its origin, it was first sketched on a classroom blackboard that year. Evans worked at wartime laboratories at General Electric and later at North American Aviation, and the method was first published in the AIEE Transactions. Evans also invented the Spirule in 1948, a drafting device used for plotting root loci by hand.

    Evans later set out the method in full in his 1954 book Control System Dynamics (McGraw-Hill). Because the technique needs only the open-loop poles and zeros and a handful of drawing rules, engineers could sketch a locus with pencil, paper and a Spirule long before computers could solve polynomials. Historians of control place the arrival of the technique toward the end of the 1940s, alongside the other classical tools that grew out of the war years. [Wikipedia, Walter R. Evans] [WalterREvans.com, Introduction to Root Locus] [Lund University, Bissell History of Automatic Control]

    Why It Is Important

    Before the root locus, finding how closed-loop poles moved with gain meant solving a new high-degree polynomial for every value of K. The root locus replaced that with a picture drawn once. It connects the open-loop model, which is usually easy to obtain, to the closed-loop behavior you actually care about, and it shows exactly how much gain the loop can tolerate before it goes unstable.

    It is also a design tool, not just an analysis tool. If the locus does not pass through the pole positions you want, you can add a compensator pole or zero, such as the zero in a PD or lead compensator, and watch the branches bend toward a better region of the plane. This is why the method remains a core part of control courses and is built into the tools engineers use for design.

    What It Is Used For

    • Choosing a gain that gives the damping and speed you want, by picking a point on a branch.
    • Finding the stability limit, the critical gain where a branch crosses the imaginary axis.
    • Designing compensators by adding poles and zeros and seeing how the branches move.
    • Checking sensitivity to modeling error: branches that run close to the imaginary axis warn of fragile stability.
    • Teaching how poles, zeros and feedback interact, since every rule of the method has a plain physical reading.

    Reading This Page's Plot

    Each colored curve is one branch, and the number of branches equals the number of open-loop poles. Real-axis segments of the locus lie to the left of an odd number of real poles and zeros, branches can break away from or join the real axis where roots collide, and branches that do not end on a zero head off along asymptotes whose number equals the difference between the pole count and the zero count. Branches cross the imaginary axis at the critical gain, which the summary cards report, and the optional K marker shows where the closed-loop poles sit for one chosen gain.

    What the Bode Plot Shows

    The Bode plot evaluates G(jω), the response of the system to a pure sine wave at each frequency ω. It draws two graphs against frequency on a logarithmic axis: the magnitude in decibels, 20·log₁₀|G(jω)|, and the phase angle in degrees. Magnitude tells you how much a sine wave is amplified or attenuated, and phase tells you how far the output lags or leads the input.

    Because both axes are logarithmic or in decibels, the response of a system built from many factors is just the sum of the responses of each factor. Each real pole bends the magnitude curve down by 20 dB per decade beyond its corner frequency and adds up to 90° of phase lag, while each real zero bends it up by 20 dB per decade and adds up to 90° of phase lead. At a corner frequency the true magnitude is 3 dB away from the straight-line approximation and the phase is 45° away from its starting value.

    History of the Bode Plot

    Hendrik Bode joined Bell Labs in New York around 1926 as a designer of electronic filters and equalizers, moved to its Mathematical Research Group in 1929, and earned a PhD in physics from Columbia in 1935. In 1938 he developed the asymptotic magnitude and phase plots now called Bode plots, and he introduced the ideas of gain margin and phase margin, which let designers judge time-domain stability from frequency-domain curves. He worked alongside Harry Nyquist on the conditions for the stability of amplifier circuits.

    His 1940 paper “Relations Between Attenuation and Phase in Feedback Amplifier Design” appeared in the Bell System Technical Journal, and his 1945 book Network Analysis and Feedback Amplifier Design was long used as a graduate textbook. During World War II he also worked on the Bell Labs anti-aircraft director project, helping design the T-15 director, and Bode went on to lead mathematical research and later military development at Bell Labs until he retired in 1967. [Wikipedia, Hendrik Wade Bode] [Lund University, Bissell History of Automatic Control]

    Why It Is Important

    Nyquist's 1932 criterion decides stability from a polar plot of the open-loop frequency response, which is exact but awkward to draw by hand. Bode's plots made the same information easy to sketch with a straightedge and a few corner frequencies, and they put the stability margins, how far a loop is from instability, right on the page as numbers a designer can act on. His frequency-domain approach was faster and simpler than the traditional time-domain methods, and it is still widely used.

    Frequency response can also be measured directly. You can drive a real amplifier, motor or mechanical structure with sine waves, record the gain and phase, and plot a Bode diagram without ever writing down an equation, so the method works even when no good model exists. That makes it the common language between theory, simulation and the lab bench.

    What It Is Used For

    • Judging stability margins: the phase margin is 180° plus the phase where the magnitude crosses 0 dB, and the gain margin is how many dB below 0 dB the magnitude sits where the phase crosses −180°. Designers commonly aim for a phase margin of roughly 45° to 60° and a gain margin of 6 dB or more, though requirements vary by application.
    • Loop shaping: adding lead, lag or notch compensators to reshape the curve so the loop has high gain at low frequency for accuracy and low gain at high frequency to reject noise.
    • Finding bandwidth and resonances of amplifiers, filters, sensors, motors and structures.
    • Identifying a system from lab measurements by fitting poles and zeros to the measured curves.
    • Verifying designs in electronics, power supplies, audio equipment, robotics and aerospace.

    Reading This Page's Plot

    The top graph is magnitude and the bottom is phase, sharing the same frequency axis. The dashed lines mark 0 dB and −180°. A red dot at the 0 dB line marks the gain crossover frequency, where the phase margin is measured, and a red dot at the −180° line marks the phase crossover frequency, where the gain margin is measured. Phase is unwrapped so it does not jump by 360°, and its value is fixed from the pole and zero locations, so it is correct even when the plot starts well above the lowest corner frequency. A negative overall gain is drawn with the phase starting at −180°, and phase margins are reported between −180° and 180°, so a negative phase margin means the loop would be unstable. A resonance from poles on the imaginary axis makes the phase jump by 180°, which is not counted as a crossing. If the magnitude never crosses 0 dB or the phase never reaches −180° in the plotted range, that margin shows N/A, and you can widen the frequency range to look further.