# PI controller problem

Discussion in 'Homework Help' started by dugu, Feb 7, 2011.

1. ### dugu Thread Starter New Member

Feb 7, 2011
4
0
Hi everyone,
I tried to observe the simulation(Pspice) of a PI controller with a square wave supply. The problem is, the output voltage of the PI controller become very big like 10GV. Can anyone help me with this?Why this happened?

This is specification of square wave:
Freq of square wave = 10kHz
High Level Voltage =4V
Low Level Voltage =0V

and for PI controller:
H(s) = 1+sT/sT
T= 318us

I hope you can help me with this problem. Thank you

2. ### mik3 Senior Member

Feb 4, 2008
4,846
63
Can you post the simulation circuit and/or the results?

3. ### dugu Thread Starter New Member

Feb 7, 2011
4
0

sorry..I gave a wrong information..the square wave high level voltage is 4V and low level voltage is 1V. When I tried this there is an error. But it work fine when the low level voltage is 0V.

this is my circuit and the error report:

4. ### mik3 Senior Member

Feb 4, 2008
4,846
63
You get this high voltage because the integral term is increasing when the input is 4V and stays constant when the input is 0V. Thus the net result is an increasing output. Change the 0V to -4V.

What do you want to achieve?

dugu likes this.
5. ### dugu Thread Starter New Member

Feb 7, 2011
4
0

Actually for low level voltage = 0V, the circuit is working fine. It's not working when the low level voltage is not equal to 0. I just don't know why it is not working under this condition.

For the question what I want to achieve. I try to do the observation on how the PI controller filtered out the high frequency component of the square wave signal. So the output of the PI controller will be a dc signal. And the range of the square wave signal is between 1V(low)-4V(high).

6. ### t_n_k AAC Fanatic!

Mar 6, 2009
5,448
783
dugu,

Mik3 is quite correct in his observations.

If the mean {DC} value of the AC input is non-zero, then PI control will always integrate up or down to the function limit.

Your comment that the simulation works when the lower level is zero volts is strange - something not quite right there.

PI controls are normally part of a feedback control system where the integral action is included to null the control loop steady-state error to zero.

Why have an AC source with a DC offset if you are really only interested in the PI filtering characteristics?

You might consider doing a straight AC analysis rather than a transient analysis - that would give you a full appreciation of the signal response across a range of frequencies of interest.

Last edited: Feb 7, 2011
dugu likes this.
7. ### Georacer Moderator

Nov 25, 2009
5,151
1,266
Maybe when the low level is at 0V, the integrator doesn't ramp up as fast, in the time limit in which you run the simulation, but eventually it will.

Try to extract a Bode plot of the PI controller, either by doing an AC sweep in the frequency domain, or with a more dedicated simulation.

dugu likes this.
8. ### dugu Thread Starter New Member

Feb 7, 2011
4
0
Thank you everyone.
I've found what is the problem. The problem is with my Pspice simulation. When I click "Skip initial bias point calculation", the problem is solved. Thank you again