Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Digital Controller Implementation

Status
Not open for further replies.

vishnu91

Electrical
Nov 17, 2017
3
I do not know if this is the right place to ask. I am trying my best to implement a PI compensator for an integrator plant using a Micro-controller. Simulation in Matlab gets me a good result. But in real life, the digital controller lags and fails to track the input signal perfectly. Used floating point math to perform the job. Everything has been checked and all the computations are within the sampling interval time ( 2.5KHz). What could be wrong and how can it corrected.
 
Replies continue below

Recommended for you

There is probably a difference between the simulation and the real plant Gain. An Integrating Plant has an Integral Gain which is the plant gain at one radian per second.
 
Hi

I would be thankful, if you could elaborate on your point and suggest me the workaround
 
Mathematically if you input a 1 volt, 1 radian/sec sine wave to the plant input (Vin) and measure the plant output voltage (Vout) (Again a sine wave at 1 radian/sec with an amplitude A) the plant gain is Gain = Vout/Vin = A/1 = A
 
I may not be understanding your question, but lag, or time delay between input and response, is a characteristic of real world processes. PI controllers do not deal with it well. The derivative function in PID control, and feed forward functions are useful to improve response. But even then, time delays can make control difficult or impossible if the time lag is long compared to process perturbations.
 
A PI filter can be a good regulator for a Type 1 (single integration) plant, but it is error driven, so cannot track optimally. That is, it requires an error to create a command. The integrator can eventually reduce that error for a ramp (constant change) setpoint input, but not if the setpoint changes arbitrarily.

For good tracking, you want a feedforward component to the control output as well. The feedforward should be your best "guess" based on your plant model and the desired trajectory as to what is needed to track optimally.

Also, do examine all sources of time delay, as Compositepro suggests. If you are not careful, you can add one or two cycles of "transport delay" in your real system that may not be present in your simulation.

Curt Wilson
Omron Delta Tau
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor