# Unstability of DC chopper control through PI current controller

We usually use a DC chopper to control a DC motor. For simulation purpose I have built the following circuit in which I have tried to control the armature current of a DC motor using a DC chopper, a PI current controller and a PWM modulator:

In my simulation circuit, I have modeled the electrical and mechanical parts of a DC motor. The mechanical part is modeled to generate the adequate back-EMF (The parameters of the DC motor are shown in the circuit). The current going through the motor is sensed through a Rsense=0.5 Ω and fed the PI controller through a voltage divider with a ratio of 0.5. The output of the PI controller is fed to a non inverting amplifier with a gain of 1.71.

I used the gain amplifier because:

Va=(Ra+Rsense)*Ia+Ea (Ia:Armature current and Ea:Back EMF). Sabstituting Ea=Ke*W and W=(Kt*Ia)/B (W:Angular velocity, Ke:Back EMF coefficient and Kt=constant torque coefficient, and B:friction coefficient).

Va=(Ra+Rsense+Kt*Ke/B)*Ia. Substituting by the values given in the ciruict, we get: Va=1.71*Ia.

The result is compared with a sawtooth signal of 5 kHz and 1 V amplitude (so the PWM modulator has a gain of 1).

The PI controller components are calculated using the following procedure described in a book:

When I simulate the circuit with different references at the reference input of PI controller, I get a stable output current for some values and unstable outputs for others.

When I set the reference input to 200 mV, 500 mV, 1.2 V and 1.75 V, the output is stable and the graphs look as follows:

For other values at the reference input, like 100 mV, 300 mV, 400 mV 700 mV, 1 V, the outputs are unstable and the PI controller hits upper input, and I do not understand why?

1. Could anyone please, help me to understand where do these instabilities come from? Why the output is stable at 200 mV and 500 mV references and unstable for 300 mV and 400 mV, even though these values are bounded between 200 mV and 500 mV?
2. Is it due to hysteresis of the comparator and switches (which is set to 100 mV).

• I would recommend you try to extract from SIMPLIS the control-to-output transfer function, that is the starting point of any compensation strategy: if you apply a stimulus at the control input, how does that stimulus propagate to form the response that you will then regulate. Once you have that Bode plot in magnitude and phase, you can see where to place poles and zeroes to force crossover for a stable response. I would stay away from PI coefficients and exclusively deal with poles and zeroes (there is no subcircuit of the motor in your file). Commented Jul 16, 2023 at 19:57
• @VerbalKint, Thanks for the recommendations and sorry for the attached file, I will update it now Commented Jul 16, 2023 at 20:02