Friday, May 21, 2010

Digital Feedback Control

Linear feedback systems are well known. In the continuous domain, the Laplace transform can be used to characterize the system and find an appropriate compensator to give the desired response. But in a digital world, this can break down. If the output of the system is sampled at discrete time intervals, the time lag can cause system instability that might not be predicted with the Laplace transform.

With some simple continuous feedback systems, the gain of the feedback control can be increased to improve the response time. There might not be any theoretical limit to how high the gain can go. But in a discrete time system, the time lag can cause oscillations and instability if the gain is raised beyond some limit.

As a simple example, suppose you have an integral feedback controller. This type of feedback accumulates error and uses this to drive the thing being controlled. It can be a little slower, but it is simpler than a full-fledged PID controller. It is very stable -- it tends to asymptotically approach the set point for all gains, and it tends towards zero steady-state error, which might be important in some systems. A write-up of that kind of system is here [pdf].

In the continuous domain, the open loop gain is just the integrator, 1/s, times the feedback gain K. In closed-loop form, assuming unity feedback, the transfer function comes out to K / (K + s). As you increase K, you increase the speed of the response.

In the discrete domain, you can simply do this in a tabular fashion, as if you had a digital controller that samples the output, compares against the set point, and accumulates the error. For a small value of K, say 0.2, you get a nice exponential decay towards the set point.

Click to enlarge.

If K gets larger, you will start to see ringing but the system is still stable.


Finally, increasing K by too much will make the system unstable.


There are analytical ways of figuring the response of a discrete time system. That is for another post.

Wednesday, May 12, 2010

Another Orbit Simulator

This is one I came across while researching orbital mechanics, and was looking to see what was out there for simulators. It's pretty impressive, and it's free!

http://orbit.medphys.ucl.ac.uk/

Basically, it's a first person point of view in different types of vehicles and missions. It can get pretty involved, though. Make sure you have lots of free time.