datasheets.com EBN.com EDN.com EETimes.com Embedded.com PlanetAnalog.com TechOnline.com  
Events
UBM Tech
UBM Tech

Design Article

Rapid Design and Protoyping of Proportional-Integral-Derivative (PID) Controllers

Arkadiy Turevskiy, Brian McKay, Doug Eastman, and Paul Lambrechts

8/8/2011 2:13 PM EDT

Proportional-integral-derivative (PID) controllers are ubiquitous. Designing and tuning them may appear simple in theory, but it can be difficult and time-consuming in practice. A common method of tuning PID controllers is to manually adjust controller gains while the controller runs the plant. This time-consuming method requires access to the plant hardware and can lead to plant damage if chosen gain values result in unstable plant behavior. In this article we show how a development process can be improved by using Model-Based Design to systematically design, test, and implement PID controllers on programmable logic controllers (PLCs), programmable automation controllers (PACs), and microprocessors.

With Model-Based Design we use a block-diagram environment to create system models of the plant and controller. These models can be simulated, allowing us to quickly iterate and refine controller design before it is implemented and deployed. The need for access to plant hardware is reduced because we can do a lot of testing through simulations instead of involving the plant. Early verification through simulation ensures that the controller performs as expected when deployed to the actual plant.

Model-Based Design of PID controllers involves the following four steps:

  1. Creating the plant model
  2. Designing the PID controller
  3. Testing controller in real-time
  4. Implementing design

Using a digital-motion control system as an example, we describe how to apply Model-Based Design for rapid design and prototyping of a PID controller.

Digital Motion Control System

Figure 1 shows the plant, or the physical system, that we are trying to control.



Figure 1: Picture of the digital motion control system.

That plant consists of a power amplifier driving a DC motor and two rotary optical encoders for measuring the position of the motor shaft and the load. The motor is connected to the load through a small flexible shaft to approximate the compliance found between the actuator and the load in many motion control systems. The control system ensures that the load follows the specified trajectory by measuring the error between the commanded and measured load angle. It then uses a PID controller to calculate and send a voltage request to the motor. Our design is to improve machine performance from the current maximum speed of 150 rad/sec and acceleration of 2000 rad/sec^2 to new speed and acceleration targets of 250 rad/sec and 5000 rad/sec^2, respectively. We want to achieve these performance gains without losing any position accuracy. Specifically, we want the error between commanded and measured load angle to be less than one degree. The existing controller design does not meet the new performance specifications, as shown in Figure 2.



Figure 2: Old controller design with a maximum position error of more than 4 degrees (bottom) when trying to follow reference trajectory (top, red line – commanded load angle; yellow line-measured load angle) corresponding to new speed and acceleration targets. The performance specification is for the error to be less than 1 degree.

Instead of manually tuning PID gains on the actual plant hardware, we can use Model-Based Design to develop, test, and implement the controller.

Creating the Plant Model

There are two primary approaches for creating a plant model: data-driven modeling and first-principles modeling. With data-driven modeling we create a plant model that fits measured input-output test data. We want to operate the controller during data collection to ensure minimal disruption of plant operation. To collect the input-output data, we add as our input signal a random white noise signal onto the voltage fed to the DC motor. Our output signal is the overall voltage that the controller commands to the DC motor. After we collect this input-output data, we can calculate the frequency response of the closed-loop system. And because we know the exact gains in our current controller design (the one we are trying to improve), we can obtain the frequency response of the plant. Finally, to be able to simulate our controller in the time domain, we use the frequency response of the plant to estimate the plant transfer function using system identification techniques.




sharps_eng

8/22/2011 6:04 PM EDT

A blog about tackling a class project not very successfully - but not a proper article.
Initially used simulation tools and then right at the end, (like they ran out of time) - real hardware.
A blog is a blog, not all blogs are articles.

Nicely presented, but no credits found. Publishing project notes as an article is misleading, a waste of reading time, unfortunately.

Sign in to Reply



Please sign in to post comment

Navigate to related information

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)