Near Field Notes

Note 19SensingRev 1Watch the video · 0:49

Sense position

Low side, high side or in line: where should a motor drive sense current?

Low side, unless the motor needs every volt or a phase shorted to ground must trip the drive. Its amp sits at ground and costs least, but moteus-c1’s amp needs the bottom FET on for 3 µs of each 30 kHz cycle. That caps the motor at 43.7 V of 48 V at best, and moteus-c1’s firmware stops at 39.4 V. In line gives all 48 V and high side catches the short, each with an amp that rides 48 V.

Phase A, three ways

The shunt in each place in turn

AmpAmpAmp48 VMotor10 AHigh sideCatches a short to groundIts amp sits at 48 VBlind while the bottom FET is onIn lineSees the current all the timeIts amp jumps 48 V every switchLow sideCheapest, its amp at groundBlind while the top FET is onPhase A current, A010Amp’s inputs, V0480102030 µsShunt 0.0 A0.00 VMotor, 10 AAmpAmpAmp48 VMotor10 AHigh sideCatches a short to groundIts amp sits at 48 VBlind while the bottom FET is onIn lineSees the current all the timeIts amp jumps 48 V every switchLow sideCheapest, its amp at groundBlind while the top FET is onPhase A current, A010Amp’s inputs, V0480102030 µsShunt 0.0 A0.00 VMotor, 10 AAmpAmpAmp48 VMotor10 AHigh sideCatches a short to groundIts amp sits at 48 VBlind while the bottom FET is onIn lineSees the current all the timeIts amp jumps 48 V every switchLow sideCheapest, its amp at groundBlind while the top FET is onPhase A current, A010Amp’s inputs, V0480102030 µsShunt 0.0 A0.00 VMotor, 10 A

moteus-c1’s phase A over one 30 kHz cycle at 65% duty, 10 A out to the motor. The dashed line is the motor’s current, the solid one the shunt’s.

The numbers
ShuntCarries the motor’s 10 AReads 0 AIts amp’s inputs
High side21.6 µs a cycle11.8 µs47.2 to 48.6 V
In lineAll 33.3 µsNever−1.0 to 48.0 V
Low side11.8 µs a cycle21.6 µs−199 mV to 440 mV

Three places for a shunt

One half bridge per phase

A three-phase motor drive has a half bridge for each phase. A top FET connects the phase to the supply, a bottom FET connects it to ground, and the motor’s lead leaves from the switch node between them.

A shunt can go above the top FET, in the motor’s lead, or below the bottom FET. Each needs an amp to read the few millivolts across it.

A shunt in each place
Fig. 1948 VMotor10 AAmpAmpAmpHigh sideLow sideIn lineFig. 1948 VMotor10 AAmpAmpAmpHigh sideLow sideIn lineFig. 1948 VMotor10 AAmpAmpAmpHigh sideLow sideIn line

Each triangle is the amp that reads the shunt beside it. A drive picks one place, not all three.

The numbers
ShuntSits betweenIts amp’s inputs sit at
High sideThe 48 V rail and the top FETThe supply
In lineThe switch node and the motorThe switch node, 0 or 48 V
Low sideThe bottom FET and groundGround

moteus-c1 is a 38 mm square motor controller from mjbots. It senses low side. R6, R9 and R12 are its 2 mΩ shunts, one under each bottom FET.

A pair of thin traces runs from each shunt to U4, a DRV8323 gate driver with three amps built in. Note 5 shows why those traces start where they do.

moteus-c1’s power stage
Fig. 19bU4DRV8323R6R9R12ABC10 mmFig. 19bU4DRV8323R6R9R12ABC10 mmFig. 19bU4DRV8323R6R9R12ABC10 mm

Top copper from moteus-c1’s KiCad files. The motor’s pads A, B and C are along the top edge, the FETs under them.

The numbers
ShuntPhaseValueSizeRead by
R6A2 mΩ0805, 2.0 × 1.25 mmU4, DRV8323
R9B2 mΩ0805, 2.0 × 1.25 mmU4, DRV8323
R12C2 mΩ0805, 2.0 × 1.25 mmU4, DRV8323

High side

Between the supply and the top FET

Start at the top. A high-side shunt carries phase A’s current only while the top FET is on, 21.6 µs of each 33.3 µs cycle here.

While the bottom FET is on, the motor’s current comes up from ground and misses the shunt. It reads 0 A for 11.8 µs while the motor still carries 10 A.

Its amp’s inputs sit on the supply, which rings from 47.2 to 48.6 V after each edge. The DRV8323’s amps take inputs within 0.15 V of ground, so a high-side shunt needs an amp of its own, like TI’s INA240, rated from −4 to 80 V.

In return it catches a phase shorted to ground. That current comes from the supply through the top FET, so it passes through the shunt.

What a high-side shunt sees
Fig. 19cHigh-side shunt, A010Its amp’s inputs, V4748490102030 µsMotor, 10 ABlind, 11.8 µsFig. 19cHigh-side shunt, A010Its amp’s inputs, V4748490102030 µsMotor, 10 ABlind, 11.8 µsFig. 19cHigh-side shunt, A010Its amp’s inputs, V4748490102030 µsMotor, 10 ABlind, 11.8 µs

One 30 kHz cycle at 65% duty, from the middle of the top FET’s on-time.

The numbers
µsHigh-side shunt, AIts amp’s inputs, V
0.010.0047.57
5.010.0047.87
10.010.0047.82
11.010.0047.85
12.0−0.0148.22
16.7−0.0047.66
22.0−0.0048.19
23.00.0048.00
24.010.0047.50
30.010.0048.10

In line

In the motor’s lead

Move the shunt into the motor’s lead and it never goes blind. It carries the motor’s current all the time, so a reading can come at any moment and nothing caps the motor’s voltage.

The catch is where its amp sits: on the switch node. Every edge moves both inputs 48 V, up in 35.6 ns and down in 114 ns, 60,000 times a second.

Through that, the amp has to read 20 mV, what a 2 mΩ shunt like moteus-c1’s drops at 10 A. TI built the INA240 for this job, with what it calls enhanced PWM rejection.

The switch node’s rising edge
Fig. 19dSwitch node, V048−50050100150 ns6.5 V/ns at its fastest35.6 ns, 10 to 90%Fig. 19dSwitch node, V048−50050100150 ns6.5 V/ns at its fastest35.6 ns, 10 to 90%Fig. 19dSwitch node, V048−50050100150 ns6.5 V/ns at its fastest35.6 ns, 10 to 90%

The top FET turning on with 10 A going out to the motor. Time from where the switch node passes 24 V.

The numbers
nsSwitch node, V
−40−0.8
−20−0.6
−100.2
024.0
1035.4
2041.0
4045.7
8047.5
14047.7

Low side

Between the bottom FET and ground

At the bottom, the amp’s inputs stay near ground, so the cheapest amp will do. The DRV8323 has three built in, and moteus-c1 uses them.

The shunt sees phase A’s current only while the bottom FET is on, 11.8 µs of each cycle at 65%. For the other 21.6 µs it reads 0 A.

Each edge also rings across it. When the top FET turns on, the bottom FET’s 10 A stops in about 20 ns, falling at up to 0.9 A/ns. Through the shunt path’s 0.45 nH that kicks the voltage to 440 mV, past the 300 mV the DRV8323’s amps can read, and rings down to −199 mV. When the top FET turns off, it settles at −20 mV 1.3 µs after the command.

The low-side shunt at both edges
Fig. 19eTop FET told offAcross the shunt, mV−3000300Up through the shunt, A010012 µsThe amp’s range, ±300 mVSettled, 1.3 µsMotor, 10 ATop FET told onAcross the shunt, mV−3000300Up through the shunt, A0100.81.01.2 µs440 mVFig. 19eTop FET told offAcross the shunt, mV−3000300Up through the shunt, A010012 µsThe amp’s range, ±300 mVSettled, 1.3 µsMotor, 10 ATop FET told onAcross the shunt, mV−3000300Up through the shunt, A0100.81.01.2 µs440 mVFig. 19eTop FET told offAcross the shunt, mV−3000300Up through the shunt, A010012 µsThe amp’s range, ±300 mVSettled, 1.3 µsMotor, 10 ATop FET told onAcross the shunt, mV−3000300Up through the shunt, A0100.81.01.2 µs440 mV

At 65% duty. Time from the moment the top FET is told to turn off, then on. Settled means within 2 mV of −20 mV. The current flows up from ground through the shunt, so 10 A puts its top 20 mV below ground.

The numbers
Top FETµs after the commandAcross the shunt, mVUp through the shunt, A
Told off0.000−0.00
Told off0.50−00.01
Told off0.60−10.09
Told off0.65−90.37
Told off0.70−5512.94
Told off0.803510.44
Told off1.00−349.77
Told off1.30−209.90
Told off1.50−209.97
Told off2.00−209.98
Told on0.700−2210.03
Told on0.750−09.92
Told on0.7603036.54
Told on0.7644403.64
Told on0.766−1993.27
Told on0.7702032.51
Told on0.800−37−4.06
Told on0.900−720.54
Told on1.000101.09
Told on1.200−3−0.20

The read window

3 µs at the bottom of every cycle

A low-side reading needs the bottom FET on and the ringing gone. moteus-c1 reads all three shunts at once, in the middle of the bottom FETs’ on-time. Its firmware gives the amp 1.5 µs to settle at its gain of 20, so the bottom FET has to stay on for twice that:

tw=2·ts

=2 × 1.5 µs=3 µs

At 91% duty the window is as short as it can be. The switch node falls, the shunt takes the motor’s current, and the read comes 1.5 µs in.

The current only arrives 0.67 µs in, once the top FET has let go. It rides the bottom FET’s body diode through the dead time. The amp still gets 0.83 µs to settle, more than the 600 ns the DRV8323’s datasheet gives its amp at a gain of 20.

The shunt carries 10 A for 3.1 µs, a little longer than the 3.0 µs the bottom FET is told to stay on.

The shortest window
Fig. 19fPhase A’s switch node, V048Low-side shunt, A010−101234 µsMotor, 10 AReadBottom FET told on, 3.0 µsFig. 19fPhase A’s switch node, V048Low-side shunt, A010−101234 µsMotor, 10 AReadBottom FET told on, 3.0 µsFig. 19fPhase A’s switch node, V048Low-side shunt, A010−101234 µsMotor, 10 AReadBottom FET told on, 3.0 µs

At 91% duty, the most a 3 µs window allows at 30 kHz. Time from the moment the top FET is told to turn off.

The numbers
µs after the top FET is told offPhase A’s switch node, VLow-side shunt, A
−0.5047.7−0.00
0.0047.70.00
0.5045.20.01
0.70−0.812.94
1.00−0.29.77
1.50−0.29.97
2.00−0.29.97
3.00−0.210.00
3.50−0.710.02
4.0047.61.09

At 30 kHz a cycle lasts 33.3 µs, so no phase can stay high for more than

dmax=1−twT

=1−3 µs33.3 µs=0.91

The motor gets the difference between two phases. With one at 91% and another at 0%, that is at most

Vmax=dmax·Vbus

=0.91 × 48 V=43.7 V

A high-side shunt has the same cap, turned over. Its top FET must stay on 3 µs, so no phase can sit at 0 V.

Most the motor gets, by shunt place
Fig. 19gMost the motor gets, VIn line48.0 VHigh side, at best43.7 VLow side, at best43.7 VLow side, moteus-c1’s firmware39.4 VFig. 19gMost the motor gets, VIn line48.0 VHigh side, at best43.7 VLow side, at best43.7 VLow side, moteus-c1’s firmware39.4 VFig. 19gMost the motor gets, VIn line48.0 VHigh side, at best43.7 VLow side, at best43.7 VLow side, moteus-c1’s firmware39.4 V

At 30 kHz with moteus-c1’s amp at a gain of 20. The dashed line is the 48 V supply.

The numbers
Shunt placeShare of the supplyMost the motor gets
In line100.0%48.0 V
High side, at best91.0%43.7 V
Low side, at best91.0%43.7 V
Low side, moteus-c1’s firmware82.0%39.4 V
380

Where to sense

A key

Key to a sense position

Where should your drive sense?

  1. 1aThe motor needs every volt of the supplyIn line, with an amp like the INA240
  2. 1bIt can spare a few voltsGo to 2
  3. 2aA phase shorted to ground must trip the driveHigh side
  4. 2bCost comes firstLow side, like moteus-c1

moteus-c1’s answer is 2b: three 2 mΩ shunts read by the DRV8323’s own amps.

Set the PWM yourself

40 settings, every one drawn

The amp sets the read window. Raise the PWM rate and the same window takes a bigger share of each cycle. Raise the gain and moteus waits longer for the amp.

30 kHz
Amp gain
One cycle, and the most the motor gets

At 30 kHz and 20 V/V, low side caps the motor at 43.7 V

Phase A at its highest duty, V0480100 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best47.3 VLow side, at best47.3 VLow side, moteus-c1’s firmware46.6 VPhase A at its highest duty, V0480100 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best47.0 VLow side, at best47.0 VLow side, moteus-c1’s firmware46.1 VPhase A at its highest duty, V0480100 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best46.6 VLow side, at best46.6 VLow side, moteus-c1’s firmware45.1 VPhase A at its highest duty, V0480100 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.6 VLow side, at best45.6 VLow side, moteus-c1’s firmware43.2 VPhase A at its highest duty, V048066.7 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best46.9 VLow side, at best46.9 VLow side, moteus-c1’s firmware45.8 VPhase A at its highest duty, V048066.7 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best46.6 VLow side, at best46.6 VLow side, moteus-c1’s firmware45.1 VPhase A at its highest duty, V048066.7 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.8 VLow side, at best45.8 VLow side, moteus-c1’s firmware43.7 VPhase A at its highest duty, V048066.7 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best44.4 VLow side, at best44.4 VLow side, moteus-c1’s firmware40.8 VPhase A at its highest duty, V048050 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best46.6 VLow side, at best46.6 VLow side, moteus-c1’s firmware45.1 VPhase A at its highest duty, V048050 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best46.1 VLow side, at best46.1 VLow side, moteus-c1’s firmware44.2 VPhase A at its highest duty, V048050 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.1 VLow side, at best45.1 VLow side, moteus-c1’s firmware42.2 VPhase A at its highest duty, V048050 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best43.2 VLow side, at best43.2 VLow side, moteus-c1’s firmware38.4 VPhase A at its highest duty, V048040 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best46.2 VLow side, at best46.2 VLow side, moteus-c1’s firmware44.4 VPhase A at its highest duty, V048040 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.6 VLow side, at best45.6 VLow side, moteus-c1’s firmware43.2 VPhase A at its highest duty, V048040 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best44.4 VLow side, at best44.4 VLow side, moteus-c1’s firmware40.8 VPhase A at its highest duty, V048040 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best42.0 VLow side, at best42.0 VLow side, moteus-c1’s firmware36.0 VPhase A at its highest duty, V048033.3 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best45.8 VLow side, at best45.8 VLow side, moteus-c1’s firmware43.7 VPhase A at its highest duty, V048033.3 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.1 VLow side, at best45.1 VLow side, moteus-c1’s firmware42.2 VPhase A at its highest duty, V048033.3 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best43.7 VLow side, at best43.7 VLow side, moteus-c1’s firmware39.4 VPhase A at its highest duty, V048033.3 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best40.8 VLow side, at best40.8 VLow side, moteus-c1’s firmware33.6 VPhase A at its highest duty, V048025 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best45.1 VLow side, at best45.1 VLow side, moteus-c1’s firmware42.2 VPhase A at its highest duty, V048025 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best44.2 VLow side, at best44.2 VLow side, moteus-c1’s firmware40.3 VPhase A at its highest duty, V048025 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best42.2 VLow side, at best42.2 VLow side, moteus-c1’s firmware36.5 VPhase A at its highest duty, V048025 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best38.4 VLow side, at best38.4 VLow side, moteus-c1’s firmware28.8 VPhase A at its highest duty, V048020 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best44.4 VLow side, at best44.4 VLow side, moteus-c1’s firmware40.8 VPhase A at its highest duty, V048020 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best43.2 VLow side, at best43.2 VLow side, moteus-c1’s firmware38.4 VPhase A at its highest duty, V048020 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best40.8 VLow side, at best40.8 VLow side, moteus-c1’s firmware33.6 VPhase A at its highest duty, V048020 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best36.0 VLow side, at best36.0 VLow side, moteus-c1’s firmware24.0 VPhase A at its highest duty, V048016.7 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best43.7 VLow side, at best43.7 VLow side, moteus-c1’s firmware39.4 VPhase A at its highest duty, V048016.7 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best42.2 VLow side, at best42.2 VLow side, moteus-c1’s firmware36.5 VPhase A at its highest duty, V048016.7 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best39.4 VLow side, at best39.4 VLow side, moteus-c1’s firmware30.7 VPhase A at its highest duty, V048016.7 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best33.6 VLow side, at best33.6 VLow side, moteus-c1’s firmware19.2 VPhase A at its highest duty, V048012.5 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best42.2 VLow side, at best42.2 VLow side, moteus-c1’s firmware36.5 VPhase A at its highest duty, V048012.5 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best40.3 VLow side, at best40.3 VLow side, moteus-c1’s firmware32.6 VPhase A at its highest duty, V048012.5 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best36.5 VLow side, at best36.5 VLow side, moteus-c1’s firmware25.0 VPhase A at its highest duty, V048012.5 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best28.8 VLow side, at best28.8 VLow side, moteus-c1’s firmware9.6 VPhase A at its highest duty, V048010 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best40.8 VLow side, at best40.8 VLow side, moteus-c1’s firmware33.6 VPhase A at its highest duty, V048010 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best38.4 VLow side, at best38.4 VLow side, moteus-c1’s firmware28.8 VPhase A at its highest duty, V048010 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best33.6 VLow side, at best33.6 VLow side, moteus-c1’s firmware19.2 VPhase A at its highest duty, V048010 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best24.0 VLow side, at best24.0 VLow side, moteus-c1’s firmwareBoth windows fill the cycle0.0 VPhase A at its highest duty, V0480100 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best47.3 VLow side, at best47.3 VLow side, moteus-c1’s firmware46.6 VPhase A at its highest duty, V0480100 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best47.0 VLow side, at best47.0 VLow side, moteus-c1’s firmware46.1 VPhase A at its highest duty, V0480100 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best46.6 VLow side, at best46.6 VLow side, moteus-c1’s firmware45.1 VPhase A at its highest duty, V0480100 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.6 VLow side, at best45.6 VLow side, moteus-c1’s firmware43.2 VPhase A at its highest duty, V048066.7 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best46.9 VLow side, at best46.9 VLow side, moteus-c1’s firmware45.8 VPhase A at its highest duty, V048066.7 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best46.6 VLow side, at best46.6 VLow side, moteus-c1’s firmware45.1 VPhase A at its highest duty, V048066.7 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.8 VLow side, at best45.8 VLow side, moteus-c1’s firmware43.7 VPhase A at its highest duty, V048066.7 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best44.4 VLow side, at best44.4 VLow side, moteus-c1’s firmware40.8 VPhase A at its highest duty, V048050 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best46.6 VLow side, at best46.6 VLow side, moteus-c1’s firmware45.1 VPhase A at its highest duty, V048050 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best46.1 VLow side, at best46.1 VLow side, moteus-c1’s firmware44.2 VPhase A at its highest duty, V048050 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.1 VLow side, at best45.1 VLow side, moteus-c1’s firmware42.2 VPhase A at its highest duty, V048050 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best43.2 VLow side, at best43.2 VLow side, moteus-c1’s firmware38.4 VPhase A at its highest duty, V048040 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best46.2 VLow side, at best46.2 VLow side, moteus-c1’s firmware44.4 VPhase A at its highest duty, V048040 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.6 VLow side, at best45.6 VLow side, moteus-c1’s firmware43.2 VPhase A at its highest duty, V048040 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best44.4 VLow side, at best44.4 VLow side, moteus-c1’s firmware40.8 VPhase A at its highest duty, V048040 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best42.0 VLow side, at best42.0 VLow side, moteus-c1’s firmware36.0 VPhase A at its highest duty, V048033.3 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best45.8 VLow side, at best45.8 VLow side, moteus-c1’s firmware43.7 VPhase A at its highest duty, V048033.3 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.1 VLow side, at best45.1 VLow side, moteus-c1’s firmware42.2 VPhase A at its highest duty, V048033.3 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best43.7 VLow side, at best43.7 VLow side, moteus-c1’s firmware39.4 VPhase A at its highest duty, V048033.3 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best40.8 VLow side, at best40.8 VLow side, moteus-c1’s firmware33.6 VPhase A at its highest duty, V048025 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best45.1 VLow side, at best45.1 VLow side, moteus-c1’s firmware42.2 VPhase A at its highest duty, V048025 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best44.2 VLow side, at best44.2 VLow side, moteus-c1’s firmware40.3 VPhase A at its highest duty, V048025 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best42.2 VLow side, at best42.2 VLow side, moteus-c1’s firmware36.5 VPhase A at its highest duty, V048025 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best38.4 VLow side, at best38.4 VLow side, moteus-c1’s firmware28.8 VPhase A at its highest duty, V048020 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best44.4 VLow side, at best44.4 VLow side, moteus-c1’s firmware40.8 VPhase A at its highest duty, V048020 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best43.2 VLow side, at best43.2 VLow side, moteus-c1’s firmware38.4 VPhase A at its highest duty, V048020 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best40.8 VLow side, at best40.8 VLow side, moteus-c1’s firmware33.6 VPhase A at its highest duty, V048020 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best36.0 VLow side, at best36.0 VLow side, moteus-c1’s firmware24.0 VPhase A at its highest duty, V048016.7 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best43.7 VLow side, at best43.7 VLow side, moteus-c1’s firmware39.4 VPhase A at its highest duty, V048016.7 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best42.2 VLow side, at best42.2 VLow side, moteus-c1’s firmware36.5 VPhase A at its highest duty, V048016.7 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best39.4 VLow side, at best39.4 VLow side, moteus-c1’s firmware30.7 VPhase A at its highest duty, V048016.7 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best33.6 VLow side, at best33.6 VLow side, moteus-c1’s firmware19.2 VPhase A at its highest duty, V048012.5 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best42.2 VLow side, at best42.2 VLow side, moteus-c1’s firmware36.5 VPhase A at its highest duty, V048012.5 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best40.3 VLow side, at best40.3 VLow side, moteus-c1’s firmware32.6 VPhase A at its highest duty, V048012.5 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best36.5 VLow side, at best36.5 VLow side, moteus-c1’s firmware25.0 VPhase A at its highest duty, V048012.5 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best28.8 VLow side, at best28.8 VLow side, moteus-c1’s firmware9.6 VPhase A at its highest duty, V048010 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best40.8 VLow side, at best40.8 VLow side, moteus-c1’s firmware33.6 VPhase A at its highest duty, V048010 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best38.4 VLow side, at best38.4 VLow side, moteus-c1’s firmware28.8 VPhase A at its highest duty, V048010 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best33.6 VLow side, at best33.6 VLow side, moteus-c1’s firmware19.2 VPhase A at its highest duty, V048010 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best24.0 VLow side, at best24.0 VLow side, moteus-c1’s firmwareBoth windows fill the cycle0.0 VPhase A at its highest duty, V0480100 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best47.3 VLow side, at best47.3 VLow side, moteus-c1’s firmware46.6 VPhase A at its highest duty, V0480100 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best47.0 VLow side, at best47.0 VLow side, moteus-c1’s firmware46.1 VPhase A at its highest duty, V0480100 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best46.6 VLow side, at best46.6 VLow side, moteus-c1’s firmware45.1 VPhase A at its highest duty, V0480100 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.6 VLow side, at best45.6 VLow side, moteus-c1’s firmware43.2 VPhase A at its highest duty, V048066.7 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best46.9 VLow side, at best46.9 VLow side, moteus-c1’s firmware45.8 VPhase A at its highest duty, V048066.7 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best46.6 VLow side, at best46.6 VLow side, moteus-c1’s firmware45.1 VPhase A at its highest duty, V048066.7 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.8 VLow side, at best45.8 VLow side, moteus-c1’s firmware43.7 VPhase A at its highest duty, V048066.7 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best44.4 VLow side, at best44.4 VLow side, moteus-c1’s firmware40.8 VPhase A at its highest duty, V048050 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best46.6 VLow side, at best46.6 VLow side, moteus-c1’s firmware45.1 VPhase A at its highest duty, V048050 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best46.1 VLow side, at best46.1 VLow side, moteus-c1’s firmware44.2 VPhase A at its highest duty, V048050 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.1 VLow side, at best45.1 VLow side, moteus-c1’s firmware42.2 VPhase A at its highest duty, V048050 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best43.2 VLow side, at best43.2 VLow side, moteus-c1’s firmware38.4 VPhase A at its highest duty, V048040 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best46.2 VLow side, at best46.2 VLow side, moteus-c1’s firmware44.4 VPhase A at its highest duty, V048040 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.6 VLow side, at best45.6 VLow side, moteus-c1’s firmware43.2 VPhase A at its highest duty, V048040 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best44.4 VLow side, at best44.4 VLow side, moteus-c1’s firmware40.8 VPhase A at its highest duty, V048040 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best42.0 VLow side, at best42.0 VLow side, moteus-c1’s firmware36.0 VPhase A at its highest duty, V048033.3 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best45.8 VLow side, at best45.8 VLow side, moteus-c1’s firmware43.7 VPhase A at its highest duty, V048033.3 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best45.1 VLow side, at best45.1 VLow side, moteus-c1’s firmware42.2 VPhase A at its highest duty, V048033.3 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best43.7 VLow side, at best43.7 VLow side, moteus-c1’s firmware39.4 VPhase A at its highest duty, V048033.3 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best40.8 VLow side, at best40.8 VLow side, moteus-c1’s firmware33.6 VPhase A at its highest duty, V048025 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best45.1 VLow side, at best45.1 VLow side, moteus-c1’s firmware42.2 VPhase A at its highest duty, V048025 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best44.2 VLow side, at best44.2 VLow side, moteus-c1’s firmware40.3 VPhase A at its highest duty, V048025 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best42.2 VLow side, at best42.2 VLow side, moteus-c1’s firmware36.5 VPhase A at its highest duty, V048025 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best38.4 VLow side, at best38.4 VLow side, moteus-c1’s firmware28.8 VPhase A at its highest duty, V048020 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best44.4 VLow side, at best44.4 VLow side, moteus-c1’s firmware40.8 VPhase A at its highest duty, V048020 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best43.2 VLow side, at best43.2 VLow side, moteus-c1’s firmware38.4 VPhase A at its highest duty, V048020 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best40.8 VLow side, at best40.8 VLow side, moteus-c1’s firmware33.6 VPhase A at its highest duty, V048020 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best36.0 VLow side, at best36.0 VLow side, moteus-c1’s firmware24.0 VPhase A at its highest duty, V048016.7 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best43.7 VLow side, at best43.7 VLow side, moteus-c1’s firmware39.4 VPhase A at its highest duty, V048016.7 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best42.2 VLow side, at best42.2 VLow side, moteus-c1’s firmware36.5 VPhase A at its highest duty, V048016.7 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best39.4 VLow side, at best39.4 VLow side, moteus-c1’s firmware30.7 VPhase A at its highest duty, V048016.7 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best33.6 VLow side, at best33.6 VLow side, moteus-c1’s firmware19.2 VPhase A at its highest duty, V048012.5 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best42.2 VLow side, at best42.2 VLow side, moteus-c1’s firmware36.5 VPhase A at its highest duty, V048012.5 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best40.3 VLow side, at best40.3 VLow side, moteus-c1’s firmware32.6 VPhase A at its highest duty, V048012.5 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best36.5 VLow side, at best36.5 VLow side, moteus-c1’s firmware25.0 VPhase A at its highest duty, V048012.5 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best28.8 VLow side, at best28.8 VLow side, moteus-c1’s firmware9.6 VPhase A at its highest duty, V048010 µsRead window, 1.5 µsMost the motor gets, VIn line48.0 VHigh side, at best40.8 VLow side, at best40.8 VLow side, moteus-c1’s firmware33.6 VPhase A at its highest duty, V048010 µsRead window, 2.0 µsMost the motor gets, VIn line48.0 VHigh side, at best38.4 VLow side, at best38.4 VLow side, moteus-c1’s firmware28.8 VPhase A at its highest duty, V048010 µsRead window, 3.0 µsMost the motor gets, VIn line48.0 VHigh side, at best33.6 VLow side, at best33.6 VLow side, moteus-c1’s firmware19.2 VPhase A at its highest duty, V048010 µsRead window, 5.0 µsMost the motor gets, VIn line48.0 VHigh side, at best24.0 VLow side, at best24.0 VLow side, moteus-c1’s firmwareBoth windows fill the cycle0.0 V
Read window
3.0 µs, 9% of each cycle
Highest duty
91%
Most the motor gets, low side
43.7 V

dmax=1−3.0 µs33.3 µs=0.91

Phase A as it is told to switch, without its edges. The window sits in the middle of the bottom FET’s on-time, where moteus reads. Settling times are moteus’s, for each gain of the DRV8323’s amps.

Every case, as a table
PWMGainRead windowOf each cycleIn lineHigh side, at bestLow side, at bestLow side, moteus-c1’s firmware
10 kHz5 V/V1.5 µs1.5%48.0 V47.3 V47.3 V46.6 V
10 kHz10 V/V2.0 µs2%48.0 V47.0 V47.0 V46.1 V
10 kHz20 V/V3.0 µs3%48.0 V46.6 V46.6 V45.1 V
10 kHz40 V/V5.0 µs5%48.0 V45.6 V45.6 V43.2 V
15 kHz5 V/V1.5 µs2.2%48.0 V46.9 V46.9 V45.8 V
15 kHz10 V/V2.0 µs3%48.0 V46.6 V46.6 V45.1 V
15 kHz20 V/V3.0 µs4.5%48.0 V45.8 V45.8 V43.7 V
15 kHz40 V/V5.0 µs7.5%48.0 V44.4 V44.4 V40.8 V
20 kHz5 V/V1.5 µs3%48.0 V46.6 V46.6 V45.1 V
20 kHz10 V/V2.0 µs4%48.0 V46.1 V46.1 V44.2 V
20 kHz20 V/V3.0 µs6%48.0 V45.1 V45.1 V42.2 V
20 kHz40 V/V5.0 µs10%48.0 V43.2 V43.2 V38.4 V
25 kHz5 V/V1.5 µs3.8%48.0 V46.2 V46.2 V44.4 V
25 kHz10 V/V2.0 µs5%48.0 V45.6 V45.6 V43.2 V
25 kHz20 V/V3.0 µs7.5%48.0 V44.4 V44.4 V40.8 V
25 kHz40 V/V5.0 µs12%48.0 V42.0 V42.0 V36.0 V
30 kHz5 V/V1.5 µs4.5%48.0 V45.8 V45.8 V43.7 V
30 kHz10 V/V2.0 µs6%48.0 V45.1 V45.1 V42.2 V
30 kHz20 V/V3.0 µs9%48.0 V43.7 V43.7 V39.4 V
30 kHz40 V/V5.0 µs15%48.0 V40.8 V40.8 V33.6 V
40 kHz5 V/V1.5 µs6%48.0 V45.1 V45.1 V42.2 V
40 kHz10 V/V2.0 µs8%48.0 V44.2 V44.2 V40.3 V
40 kHz20 V/V3.0 µs12%48.0 V42.2 V42.2 V36.5 V
40 kHz40 V/V5.0 µs20%48.0 V38.4 V38.4 V28.8 V
50 kHz5 V/V1.5 µs7.5%48.0 V44.4 V44.4 V40.8 V
50 kHz10 V/V2.0 µs10%48.0 V43.2 V43.2 V38.4 V
50 kHz20 V/V3.0 µs15%48.0 V40.8 V40.8 V33.6 V
50 kHz40 V/V5.0 µs25%48.0 V36.0 V36.0 V24.0 V
60 kHz5 V/V1.5 µs9%48.0 V43.7 V43.7 V39.4 V
60 kHz10 V/V2.0 µs12%48.0 V42.2 V42.2 V36.5 V
60 kHz20 V/V3.0 µs18%48.0 V39.4 V39.4 V30.7 V
60 kHz40 V/V5.0 µs30%48.0 V33.6 V33.6 V19.2 V
80 kHz5 V/V1.5 µs12%48.0 V42.2 V42.2 V36.5 V
80 kHz10 V/V2.0 µs16%48.0 V40.3 V40.3 V32.6 V
80 kHz20 V/V3.0 µs24%48.0 V36.5 V36.5 V25.0 V
80 kHz40 V/V5.0 µs40%48.0 V28.8 V28.8 V9.6 V
100 kHz5 V/V1.5 µs15%48.0 V40.8 V40.8 V33.6 V
100 kHz10 V/V2.0 µs20%48.0 V38.4 V38.4 V28.8 V
100 kHz20 V/V3.0 µs30%48.0 V33.6 V33.6 V19.2 V
100 kHz40 V/V5.0 µs50%48.0 V24.0 V24.0 V0.0 V

Conditions

Board
mjbots moteus-c1 r1.2, phase A, at 48 V with 10 A leaving the switch node
Bench
The circuit of Note 4: moteus-c1’s copper from an openEMS solve, the DRV8323S’s drive and Toshiba TPN19008QM FETs, the leg Note 20 also uses, run for one whole 30 kHz cycle at 65% and at 91% duty
Motor
A steady 10 A out of the switch node, so an in-line shunt carries exactly the motor’s current
Waves
Each run cut where both ends match, in the bottom FET’s settled on-time, so one cycle repeats exactly
Timing
moteus’s firmware, read 2026-11-05: 30 kHz, all three shunts read in the middle of the bottom FETs’ on-time, the amp given 0.75, 1.0, 1.5 or 2.5 µs to settle at a gain of 5, 10, 20 or 40
Limits
The largest line-to-line voltage with no phase clipped. At best, one phase at the highest duty and another at 0%. For moteus-c1’s firmware and for two shunts read, moteus’s own centering of the three phases, from a model run for every setting
Solver
ngspice

Simulated only. Nothing on this page has been measured on a board yet.

Limits

  • The bench has no high-side or in-line shunt. Their currents are the top FET’s and the motor’s, and their few millivolts of drop are left out.
  • The amps themselves aren’t modeled. The DRV8323’s datasheet gives 600 ns for its amp to settle within 1% at a gain of 20. moteus allows 1.5 µs.
  • Duty here is as told. In the sim, dead time and switching delays keep phase A’s switch node high for 90.5% of the cycle when told 91%.
  • Fig. 19b’s sense traces come from the KiCad files. The bench solved phase A’s power loop, not them.
  • Phases B and C, and the motor’s inductance and back-EMF, aren’t simulated.

Files

  • psim/cycle.pyThe whole-cycle runs on the bench
  • psim/edge.pyThe switch node’s edges
  • psim/pwm.pymoteus’s modulation and the duty limits

Sources

Like this note?

Rev 1 ·
  1. Rev 1First published

Each fix gets a line here, with the reader's name if they want credit.

Did it answer your question?

Want more on this?

Report a problem

What should the next note be? Ask for one