I am attempting to simulate a DC motor circuit on Simulink. I have built the block diagram mainly according to a tutorial, and am confused about an aspect of it. The main circuit has a DC power source in series with an "ideal switch" block (triggered by a stair generator), a resistor to limit the inrush current, and the separately excited/permanent magnet DC motor block. When I cut out the switch block and just have the power source in series with the resistor etc. the circuit behaves roughly as expected, but when the switch block is added in, the response suddenly has massive current spikes (~10^4A rather than ~40A), often followed by large negative currents. My best explanation for why these negative currents are happening is that for some reason the initial massive currents are spinning the motor up very fast which increases the motor back emf to much larger than the supply voltage, but I am at a loss to explain the initial high current.

In the tutorial there is a second resistor which goes from between the switch and normal resistor to ground. This seems to fix the problem caused by inserting the switch, but I don't understand why. The value of the resistor here does not affect the scope results unless it is above about 8500 ohms (but below this, it could be 10ohms or 8000ohms and still show the same results as no switch and no resistor), where it starts to behave more like it does without the second resistor there - like it's tending towards an open circuit.

Can anyone explain why adding in the switch causes such strange results? I've read the help section on the block but am not much the wiser, and the results are similar, but not identical if I use a breaker block rather than a switch. Further, why does the added resistor to ground then fix it?

Plot of the armature current without switch block in circuit

Armature current plot without switch block in circuit

Plot of the armature current with switch block in circuit Armature current plot with switch block but without added resistor to ground

*Edit: A block diagram of the system, StartingResistance3 is the current-limiting resistance, StartingResistance2 is the resistance going to ground that fixes the changes that come with the switch. Block diagram

  • \$\begingroup\$ Screenshot of model please \$\endgroup\$ – JonRB Jan 1 '18 at 18:36
  • \$\begingroup\$ Thought as much... \$\endgroup\$ – JonRB Jan 1 '18 at 23:09

The reason for what you are seeing is the background engine is attempting to resolve the sudden change in current (abrupt breaker opening) against is mathematical representation of a DC machine.

If you look under the mask of the DC machine you will see the A+ and A- terminals are linked via an ideal-R and an ideal-L plus a voltage source. It then measures the "stator current" to then influence the mathematical model w.r.t. the backemf: Torque = Kt*i => inertia => integrator etc...

The only way to mathematically resolve the sudden stop in current is with the apparent high current to "model" a massive deceleration.

This resistor provides a freewheel path for the model's current

  • \$\begingroup\$ Thanks for your response, how does this apply to when the switch is closed rather than opened? I assume this would be a sudden increase in current that the machine is dealing with, so does it deal with it in the same way as a decrease? \$\endgroup\$ – FHC Jan 2 '18 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.