DC motor speed control calculator

A brushed DC motor's speed follows ω(s)/V(s) = K/((Js + b)(Ls + R) + K²). Type R, L, K, J and b and this calculator gives the poles, the start-up and reversal current spikes, the torque-speed lines, a PID speed loop with the voltage it really asks for, the H-bridge quadrant and current ripple, and the three classical speed-control methods. Free, runs in your browser.

It opens on the motor of Skill-Lync's DC motor speed control project (the CTMS values J 0.01, b 0.1, K 0.01, R 1, L 0.5) and also carries a real FAULHABER motor from its datasheet. The check tab reads the gains in your report and names the slips Skill-Lync found in 313 of them.

CTMS DC Motor Speed · Simulink PID Controller block · FAULHABER 2342 CR datasheet · Mohan full-bridge switching · 580 checks against an independent solution at build · Updated 22 Nov 2026

J 0.01 kg m², b 0.1 N m s, K 0.01, R 1 Ω, L 0.5 H (CTMS DC Motor Speed); 1 V step, 1 rad/s reference. K = 1.047 V/krpm, 1.416 oz-in/A.

Opens on the project motor and CTMS's 1 V open-loop step. Pick the FAULHABER motor to see a real start-up spike. Friction torque is treated as a constant load.

Speed per volt0.0999 rad/spoles −2.003, −9.997
Peak current0.999 AV/R = 1 A
Steady speed0.0999 rad/s0.954 rpm
00.050.1speed ω (rad/s)00.51armature current (A)012345time (s)
00.51no load 0.954 rpmspeed (rpm)00.51current (A)01e-42e-4max 0.00025 W at ω0/2output power (W)00.010.02max 0.025 %efficiency (%)0246810shaft torque (mN m)
  • Poles −2.003, −9.997 s⁻¹ (two real poles: no oscillation). τe = L/R = 0.5 s, τm = JR/(K² + bR) = 0.0999 s.
  • τe is not small next to τm, so the L → 0 model is poor here: its pole −10.01 vs the true slow pole −2.003.
  • Steady speed at 1 V with no load: 0.0999 rad/s (0.954 rpm), current 0.999 A; DC gain K/(bR + K²) = 0.0999 rad/s per volt.
  • Here bR = 0.1 is 1,000 times K² = 0.0001: viscous friction, not back-EMF, limits the speed, so the running current stays close to V/R and there is no start-up spike to speak of.

What is the transfer function of a DC motor?

Two equations describe a brushed (or separately excited, constant-field) DC motor: the armature circuit and the shaft. In SI units the torque constant and the back-EMF constant are the same number, K = Kt = Ke (N m/A = V s/rad). A datasheet's 1 V/krpm is 0.00955 V s/rad, and 1 oz-in/A is 0.00706 N m/A.

With zero initial conditions, eliminating the current gives the speed and position transfer functions:

For the project motor (the University of Michigan / Carnegie Mellon CTMS values that 149–181 of the 313 reports state):

Here τe = 0.5 s and τm = 0.0999 s: the electrical time constant is the longer one, so dropping L is a poor approximation (pole −10.01 against the true slow pole −2.003). For the FAULHABER motor it is the other way round: τe = 35.8 µs and τm = 5.16 ms, and the first-order model is fine. A 1 V step on the project motor settles at 0.0999 rad/s after 2.07 s (2 % band).

Why does the armature current shoot up at start-up?

At standstill the motor makes no back-EMF (E = Kω = 0), so only R, and for a few τe the inductance, limit the current. As the shaft speeds up the back-EMF grows and the current falls to what friction and the load need. Reversing the supply at speed is worse, because the back-EMF now adds to the supply until the shaft slows down (plugging):

On the FAULHABER 2342 S 012 CR at 12 V the current peaks at 6.05 A after 179 µs (V/R = 6.22 A) and settles at 0.068 A. Reversing from the no-load speed of 7,762 rpm gives 12 A, close to (V + E)/R = 12.4 A. The project motor shows no spike at all: its friction term bR = 0.1 is a thousand times K² = 0.0001, so the current sits near V/R throughout.

Lowering the duty cycle lowers the spike only because it lowers the average voltage, and with it the speed. The real remedies limit the current: a current loop or current limit in the drive, or a soft start that ramps the voltage. Keeping the FAULHABER motor under 2 A needs a ramp of at least 15.8 ms; the closed form below gives 16.6 ms. Try it with "voltage ramp" in the Motor model tab or the current limit in the H-bridge tab.

What do the torque-speed characteristics look like?

In steady state the shaft torque falls linearly with speed, the current rises linearly with torque, the output power peaks at half the no-load speed, and the efficiency peaks at light load, where the friction loss is small next to the output:

The model from the datasheet's R, K and friction torque, against the datasheet's own figures:

FAULHABER 2342 SModel 012 CRDatasheetModel 024 CRDatasheet
No-load speed (rpm)7,762 (+3.1 %)7,5307,931 (+0.77 %)7,870
Stall torque (mN m)89.8 (+4.3 %)86.195.1 (+2.1 %)93.2
No-load current (A)0.06850.06940.03460.0351
Slope of n-M curve (rpm/mN m)86.586.283.483.3
Max efficiency (%)80.17780.779

The slope R/K² matches the datasheet to within 0.3 %, and the friction torque reproduces the no-load current. The no-load speed and stall torque come out +3.1 % and +4.3 % high for the 012 CR (+0.77 % and +2.1 % for the 024 CR), and the maximum efficiency 1.7–3.1 points high. The datasheet's own n0 and stall torque sit on its printed slope, so the gap is between its rated K and R and what it measured; this simple model has no brush drop or iron loss to close it. Treat the model as a few per cent optimistic at the ends of the line.

How do you design a PID for DC motor speed control?

Simulink's PID Controller block in its parallel form, with the voltage as its output:

With an ideal derivative (N → ∞, what CTMS uses) the closed loop is a cubic, and Routh's test gives the stability condition on paper:

CTMS asks for settling under 2 s, overshoot under 5 % and steady-state error under 1 % for a 1 rad/s step, and ends with Kp = 100, Ki = 200, Kd = 10. On paper they work. What the page does not show is the voltage:

Gains on the project motorOvershootSettling (2 %)ErrorPeak voltagePeak current
CTMS 100, 200, 10, ideal derivative1.03 %0.257 s0 %impulse, then −100 to 10 V20 A
CTMS gains, PID block filter N = 1000.911 %0.266 s0 %−65 to 1,100 V18.7 A
PI cancelling the slow pole, ζ = 0.8: Kp 19.52, Ki 39.091.52 %0.601 s0 %9.85 to 20.7 V10.2 A

Holding 1 rad/s takes 10 V and about 1 A. The ideal derivative turns the step into a voltage impulse, which through the inductance makes the current jump by Kd Δr / L = 20 A at t = 0. That current accelerates the shaft so hard that the derivative term then pulls the voltage to −100 V. With the PID block's default filter the impulse becomes a 1,100 V spike (Kp + Kd N = 1,100 V per rad/s of step). Put a ±12 V supply limit on the filtered loop and the overshoot is 19.4 % without anti-windup and 0 % with the integrator clamped, against 0.911 % with no limit; the Speed control tab shows each case.

A gentler design cancels the slow mechanical pole p1 with the PI zero and sets the damping of what is left:

That meets all three requirements, settling in 0.601 s with at most 20.7 V and 10.2 A, against an impulse, 100 V and 20 A for the CTMS gains. Placing all three poles of the ideal PID loop at ζ = 0.8, ωn = 8 rad/s and a third pole at 5ζωn gives Kp = 226.8, Ki = 1,024, Kd = 16.4. Both are buttons in the Speed control tab.

What do the DC motor control reports do?

As of 22 Nov 2026, Skill-Lync read 1,167 public reports on its two DC motor projects: n = 313 distinct reports of "Speed Control of a Direct Current (DC) motor" (MATLAB and Simulink Basics) and n = 849 distinct reports of the EV programs' "Week-7 Challenge: DC Motor Control". These counts are a starting point, not a survey of every learner.

Gains from place(). 143 of the 313 speed-control reports (46 %) design the "PID" with K = place(A, B, P), with poles from ζ = 0.5 (101 state it) and a 1 Hz natural frequency, ωn = 2π (97). They then set Kp = K(1), Kd = K(2) and choose Ki by trial. 41 reports print exactly Kp = 38.3133 and Kd = −2.8584. Those are state-feedback gains for x = [ω; i]:

With ζ = 0.5 and ωn = 2π the formulas give K1 = 38.3133 and K2 = −2.8584, the reports' numbers. K2 multiplies the armature current. In a PID block it becomes a negative gain on the derivative of the speed error, and the loop is a different system:

Without Ki the motor settles at 79.3 % of the reference, with 41.3 % overshoot, and the poles are −3.142 ± 9.315j, not the −3.142 ± 5.441j that were asked for. The negative Kd also gives a negative voltage impulse at the step. To keep the place() design, use it as state feedback with the gain N̄ = 19.74 on the reference, which puts the poles where you asked and settles on the reference. Or design the PID directly, as above.

Other gains. 25 reports print Kp = 1, 20 Ki = 0 and 15 Kd = 0. Kp = 1 on its own holds the speed at 9.08 % of the target. 153 reports mention overshoot, 118 steady-state error, 116 settling time and 41 rise time; 41 use a Discrete PID block and 10 the PID Tuner.

Almost nobody checks the voltage. Only 4 reports add a load torque, 1 a saturation and 3 anti-windup. The project model has no supply limit, so any gain works on screen. The peak voltage line in the PID and check tabs is the number to put in your report.

The week-7 current shoot-up. The challenge asks to explain MATLAB's "Speed control of a DC motor using BJT H-bridge" demo, comment on the armature current shoot-up and compare it with the Four-Quadrant Chopper DC Drive (DC7) block. 744 of the 849 reports discuss the shoot-up. Only 29 give the cause, zero back-EMF at standstill, and 3 say that at the reversal the back-EMF adds to the reversed supply. 157 propose lowering the duty cycle, which lowers the spike only by lowering the speed; 134 mention a current limit, soft start or ramp, and 57 blame switching transients or the inductor's energy. The reports describe the demo motor as a 5 HP, 1750 rpm preset (386 mention 5 HP, 499 1750 rpm, 467 24 V) run at 75 % duty (630) and reversed at 0.5 s (502 link the spike to the reversal). MathWorks' page for that example and the DC7 block's reference page no longer load (404 on 22 Nov 2026), so this calculator does not reproduce the demo's preset motor. The physics is the same on any motor: see the spike section above.

How does an H-bridge drive a DC motor in four quadrants?

An H-bridge has two legs, each with an upper and a lower switch and a diode across each switch. In each leg one of the two switches is gated at a time, so the leg's voltage is set by the gate signal alone; the sign of the current decides whether the transistor or the diode carries it. That is why the same bridge can drive and brake in both directions: forward motoring (V > 0, I > 0), forward braking with energy back to the supply (V > 0, I < 0), reverse motoring and reverse braking. The H-bridge tab highlights which devices conduct in each switching state.

With bipolar switching the diagonal pairs switch together and the motor sees +Vd or −Vd. Unipolar switching runs the legs from two references, so the motor sees +Vd or 0 (or −Vd or 0): the same average, but the ripple is at twice the switching frequency and smaller for the same inductance. The ripple formulas above neglect R and assume the speed, so the back-EMF, is constant over a period; they are derived here and checked against a simulation of the switched circuit, and the tab also gives the exact value with R.

A worked case (the problem on slide 32 of TU Delft's DC-DC converter lecture, which prints no answers; these are ours): Vd = 250 V, 30 kHz, La = 0.2 mH, R negligible, Vo = 200 V. Then D1 = 0.9 and D2 = 0.1. Unipolar switching ripples at 60 kHz with ΔI = 3.333 A peak to peak, so at Ia = 1 A the current swings from 2.667 A to −0.6667 A and reverses every period (a diode and a transistor of each leg take turns). Bipolar switching ripples at 30 kHz with ΔI = 7.5 A. For the FAULHABER motor at half its no-load speed on 12 V and 20 kHz, bipolar switching gives 3.18 A of ripple and unipolar 1.07 A, against a running current of about 0.07 A: this tiny inductance needs a much higher frequency or the unipolar scheme.

For the timer settings that make the PWM, see the AVR PWM calculator; the same duty-cycle maths in a DC-DC converter is in the buck converter calculator.

What are the speed control methods of a DC motor?

For a separately excited motor, or a shunt motor with its field held constant, steady speed against load torque is a straight line, and each method moves it a different way:

  • Armature voltage control moves the line down: lower no-load speed, same slope, full torque at rated current. It is used below base speed (rated voltage, full field), today from a controlled rectifier or a chopper.
  • Field weakening (k < 1) raises the no-load speed and makes the slope steeper by 1/k². At rated armature current the torque falls as 1/speed and the power stays constant, so it is used above base speed.
  • Armature resistance control keeps the no-load speed and only steepens the slope. The extra resistor burns I²Rx, so it is kept for short or intermittent duty.

Worked example (University of Anbar lecture notes, Example 1): a 230 V, 500 rpm, 100 A separately excited motor with Ra = 0.1 Ω drives a constant-torque load. Find the voltage for 400 rpm, and the flux for 800 rpm.

The notes print E = 220 V, ω = 52.4 rad/s, Kφ = 4.2, 176 V, V = 186 V and k = 0.61 or 0.05, the feasible value being 0.61: the calculator matches every printed figure to its printed precision. The same 400 rpm by armature resistance needs Rx = 0.44 Ω, which burns 4,400 W of the 23,000 W drawn, against 18,600 W drawn by voltage control for the same 17,600 W of electromagnetic power.

Which slips does the check tab catch?

  • State-feedback gains from place() used as Kp and Kd: a negative Kd; the tab tells you which ζ and ωn they were placed for and what the PID loop really does.
  • Ki = 0: the speed settles at KKp/(bR + K² + KKp) of the reference.
  • An unstable set of gains, by Routh's test and the closed-loop poles.
  • Overshoot and settling claims that do not match the gains on this motor.
  • A voltage no supply gives: the impulse of an ideal derivative, the current jump Kd Δr/L, and the peak voltage against your supply.

What this calculator does not cover

  • Brush drop, armature reaction, iron loss and saturation. The model is linear with constant K; the FAULHABER comparison shows what that costs.
  • The switching inside the PID tab. The speed loop applies an average voltage; the H-bridge tab treats ripple separately at a fixed speed.
  • Discrete-time control and current loops. A Discrete PID block with a slow sample time adds lag that the continuous model does not show; a real drive usually has an inner current loop.
  • Coulomb friction as friction. The friction torque is a constant load in the time response, so it does not reverse with the speed.
Learn motor control with Simulink

Modelling a motor, tuning its speed loop and showing the drive can deliver it is daily work in EV and motor-control teams. The speed control project is part of Skill-Lync's MATLAB and Simulink Basics course; the week-7 challenge is in its EV programs.

Frequently asked questions

What is the transfer function of a DC motor?

ω(s)/V(s) = K/((Js + b)(Ls + R) + K²), from the armature circuit and the shaft equation, with Kt = Ke = K. For the project motor (J 0.01, b 0.1, K 0.01, R 1 Ω, L 0.5 H) it is 0.01/(0.005s² + 0.06s + 0.1001), with poles at −2.003 and −9.997 and 0.0999 rad/s per volt.

Why does the armature current shoot up when a DC motor starts?

At standstill there is no back-EMF, so only the resistance and inductance limit the current, which heads for V/R. A FAULHABER 2342 S 012 CR on 12 V peaks at 6.05 A against 0.068 A running free. Reversing at full speed is worse: (V + E)/R, 12 A here.

What PID gains does the CTMS DC motor speed example use?

Kp = 100, Ki = 200 and Kd = 10, for a 1 rad/s step with settling under 2 s, overshoot under 5 % and error under 1 %. They meet all three (1.03 %, 0.257 s, 0 %) but ask for a voltage impulse, a 20 A current jump and then −100 V, where 10 V holds the speed.

Why does place() give Kp = 38.31 and Kd = −2.86 for the DC motor?

Those are state-feedback gains for x = [ω; i] that place the poles at ωn = 2π rad/s, ζ = 0.5. K(1) multiplies the speed and K(2) the armature current. Typed into a PID block as Kp and Kd they make a different loop, which settles at 79 % of the reference without Ki.

What are the speed control methods of a DC motor?

Armature voltage control lowers the no-load speed and keeps the slope and full torque: it is used below base speed. Field weakening raises the no-load speed and steepens the slope, at constant power above base speed. Armature resistance control only steepens the slope and wastes I²R in the resistor.

How does an H-bridge give four-quadrant operation of a DC motor?

Two legs of two switches with diodes across them let the average voltage and the current each take either sign. Forward motoring has both positive; forward braking keeps the voltage positive while the current reverses and returns energy to the supply. The switch states set the voltage; the current's sign decides transistor or diode.

Related on Skill-Lync

Sources

  • University of Michigan and Carnegie Mellon, Control Tutorials for MATLAB (CTM): "DC Motor Speed Modeling" (J = 0.01, b = 0.1, K = Ke = Kt = 0.01, R = 1 Ω, L = 0.5 H, "derived by experiment from an actual motor in Carnegie Mellon's undergraduate controls lab"; requirements: settling under 2 s, overshoot under 5 %, steady-state error under 1 %) and "PID Design Method for DC Motor Speed Control" (final Kp = 100, Ki = 200, Kd = 10), read in the copy hosted by the University of Alberta.
  • FAULHABER, DC-Micromotors, Series 2342 ... CR datasheet: values at 22 °C and nominal voltage for 2342 S 012 CR and 024 CR (terminal resistance, rotor inductance, torque and speed constants, rotor inertia, friction torque, no-load speed and current, stall torque, slope of the n-M curve, maximum efficiency).
  • MathWorks, Simulink PID Controller block reference: parallel form P + I/s + D N s/(s + N), defaults P = 1, I = 1, D = 0, N = 100; "clamping" anti-windup (integration stops when the sum of the block components exceeds the output limits and the integrator input and saturation input have the same sign).
  • TU Delft OpenCourseWare, Electronic Power Conversion, 7. DC-DC switch mode converters (diagrams from N. Mohan, T. M. Undeland and W. P. Robbins, Power Electronics: Converters, Applications, and Design): full-bridge Vo = (2D1 − 1)Vd for bipolar and unipolar switching, unipolar ripple at 2fs and smaller for the same L, four-quadrant operation, and the slide-32 problem.
  • University of Anbar, lecture notes on DC motor drives: armature voltage, field and armature resistance control, plugging, and Example 1 (230 V, 500 rpm, 100 A, 0.1 Ω).
  • Skill-Lync, 1,167 public DC motor project reports read 22 Nov 2026: motor values, gains, place() scripts, requirements and the week-7 shoot-up explanations.
  • Skill-Lync, scripts/verify/dc_motor.py: python-control transfer functions, poles and step metrics; scipy solve_ivp (Radau, tolerance 10⁻¹⁰) of the armature and shaft equations with the PID states, supply limit and clamping; Routh against eigenvalues; the H-bridge simulated from the carrier comparison; the page checks itself against it at build (580 checks).
Free counselling

From a motor model to a motor-control career.

Modelling a motor, tuning a controller and proving it with honest numbers is the core of EV powertrain and model-based development roles. A Skill-Lync counsellor can map the course that fits the role you want.

Talk to a course counsellor

Free. We call you back, usually the same day.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.