Premium Content

New Signal Chain Resources from Texas Instruments:

Analog Simulation Tools Aid Digital-Control-Circuit Designers

Gain a greater intuitive understanding of system operation by transforming your design into its most fundamental elements for simulation.

Date Posted: December 04, 2003 12:00 AM

Spice Results
Loop gain is the ratio of ac response (PI in Figure 4) to ac stimulus (PWM in Figure 4) through the feedback loop. A system is stable with less than 180° lag at unity gain or 0 dB. Phase margin indicates the additional lag before instability is reached. The loop starts at 180° in a negative feedback system so 180° lag actually occurs at 360°, which is the same as 0°.

This stability criterion can be interpreted to state that the gain through the loop should roll off to unity in response to a single pole. Each pole contributes 90° total phase lag, and multiple uncompensated poles can induce instability. The infrared filter contributes one pole and the integrator capacitor contributes another. Therefore, the pole of the integrator must be cancelled by the proportional term prior to the unity-loop-gain frequency.

Figure 5 shows the loop gain of the simulated infrared controller, which shows a 3.25-Hz bandwidth and 72.3° phase margin. These values were calculated automatically by the postprocessor in the evaluation version of Intusoft Spice. Mathematically, the ratio of PI to PWM is taken as a difference when calculating gain in dB, as well as phase.

While the hardware step response in Figure 3 gives a rough indication of loop bandwidth and phase margin, it doesn’t pave the way to optimization as well as the loop-gain plot in Figure 5. This graphic demonstrates that bandwidth is ultimately limited by sample frequency, and that proportional correction must exceed integral correction at the unity-gain frequency. These types of valuable observations are easier to reach after working with analytical tools than trial-and-error methods.

For example, if this exercise were repeated without proportional gain, the system step response would be on the verge of oscillation. This is because the lag of the integrator combined with the lag of the infrared circuit drives the loop phase dangerously close to 180° at the unity-gain frequency. On the other hand, without integral gain the system would be stable, but possess significant steady-state error. This is due to dc loop gain being low with only the proportional term. If lower gains were used for both terms, the loop bandwidth would be reduced and the circuit response to changes would be slow. Proper combination of proportional and integral gain is essential for a fast, stable, and accurate response.

In this case, the frequency in which proportional gain exceeds integral gain {f = 1/[(2π)(50 kΩ)(6.4 µF)] = 0.50 Hz} comes slightly after the corner frequency of the infrared circuit {f = 1/[(2π)(1 MΩ)(0.47 µF)] = 0.34 Hz} to maintain a single-pole roll-off to unity-loop gain. Proportional gain is selected to achieve a control-loop bandwidth (3.25 Hz) approximately one decade higher than the infrared circuit bandwidth (0.34 Hz).

Figure 6 is the transient step response of the simulated infrared controller, which matches the hardware measurement in Figure 3 very well. Gains and time constants of the infrared hardware and software compensation were varied, and multiple simulations were successfully compared to hardware results to validate the proposed techniques.

These gains were chosen conservatively for a robust response, despite changing conditions and production variations. Inspecting the Figure 5 Bode Plot of loop gain reveals that a more-aggressive design with higher bandwidth can be achieved by doubling both gains. Increasing KP to 10 (Rprop = 100 KΩ) and KI to 0.4 (Cint = 3.2 µF) results in an 8.1-Hz loop bandwidth with 60° phase margin. This modification is experimentally confirmed by passing a thin object through the infrared path shown in Figure 1, and noting a smaller AD0 disturbance in Figure 3 compared to the original gains of KP = 5 and KI = 0.2.

Spice Results
Loop gain is the ratio of ac response (PI in Figure 4) to ac stimulus (PWM in Figure 4) through the feedback loop. A system is stable with less than 180° lag at unity gain or 0 dB. Phase margin indicates the additional lag before instability is reached. The loop starts at 180° in a negative feedback system so 180° lag actually occurs at 360°, which is the same as 0°.

This stability criterion can be interpreted to state that the gain through the loop should roll off to unity in response to a single pole. Each pole contributes 90° total phase lag, and multiple uncompensated poles can induce instability. The infrared filter contributes one pole and the integrator capacitor contributes another. Therefore, the pole of the integrator must be cancelled by the proportional term prior to the unity-loop-gain frequency.

Figure 5 shows the loop gain of the simulated infrared controller, which shows a 3.25-Hz bandwidth and 72.3° phase margin. These values were calculated automatically by the postprocessor in the evaluation version of Intusoft Spice. Mathematically, the ratio of PI to PWM is taken as a difference when calculating gain in dB, as well as phase.

While the hardware step response in Figure 3 gives a rough indication of loop bandwidth and phase margin, it doesn’t pave the way to optimization as well as the loop-gain plot in Figure 5. This graphic demonstrates that bandwidth is ultimately limited by sample frequency, and that proportional correction must exceed integral correction at the unity-gain frequency. These types of valuable observations are easier to reach after working with analytical tools than trial-and-error methods.

For example, if this exercise were repeated without proportional gain, the system step response would be on the verge of oscillation. This is because the lag of the integrator combined with the lag of the infrared circuit drives the loop phase dangerously close to 180° at the unity-gain frequency. On the other hand, without integral gain the system would be stable, but possess significant steady-state error. This is due to dc loop gain being low with only the proportional term. If lower gains were used for both terms, the loop bandwidth would be reduced and the circuit response to changes would be slow. Proper combination of proportional and integral gain is essential for a fast, stable, and accurate response.

In this case, the frequency in which proportional gain exceeds integral gain {f = 1/[(2π)(50 kΩ)(6.4 µF)] = 0.50 Hz} comes slightly after the corner frequency of the infrared circuit {f = 1/[(2π)(1 MΩ)(0.47 µF)] = 0.34 Hz} to maintain a single-pole roll-off to unity-loop gain. Proportional gain is selected to achieve a control-loop bandwidth (3.25 Hz) approximately one decade higher than the infrared circuit bandwidth (0.34 Hz).

Figure 6 is the transient step response of the simulated infrared controller, which matches the hardware measurement in Figure 3 very well. Gains and time constants of the infrared hardware and software compensation were varied, and multiple simulations were successfully compared to hardware results to validate the proposed techniques.

These gains were chosen conservatively for a robust response, despite changing conditions and production variations. Inspecting the Figure 5 Bode Plot of loop gain reveals that a more-aggressive design with higher bandwidth can be achieved by doubling both gains. Increasing KP to 10 (Rprop = 100 KΩ) and KI to 0.4 (Cint = 3.2 µF) results in an 8.1-Hz loop bandwidth with 60° phase margin. This modification is experimentally confirmed by passing a thin object through the infrared path shown in Figure 1, and noting a smaller AD0 disturbance in Figure 3 compared to the original gains of KP = 5 and KI = 0.2.

microcontrollers
Part Inventory
Go
powered by:
 

 
You must log on before posting a comment.

Are you a new visitor? Register Here
    There are no comments to display. Be the first one!