PREFACE

Designing software for control systems is difficult. Experienced controls engineers have learned many techniques that allow them to solve problems. This book was written to present methods for designing controls software using Programmable Logic Controllers (PLCs). It is my personal hope that by employing the knowledge in the book that you will be able to quickly write controls programs that work as expected (and avoid having to learn by costly mistakes.)

This book has been designed for students with some knowledge of technology, including limited electricity, who wish to learn the discipline of practical control system design on commonly used hardware. To this end the book will use the Allen Bradley ControlLogix processors to allow depth. Although the chapters will focus on specific hardware, the techniques are portable to other PLCs. Whenever possible the IEC 61131 programming standards will be used to help in the use of other PLCs.

In some cases the material will build upon the content found in a linear controls course. But, a heavy emphasis is placed on discrete control systems. Figure .1 Control Dichotomy crudely shows some of the basic categories of control system problems.

Figure .1 Control Dichotomy

• Continuous - The values to be controlled change smoothly. e.g. the speed of a car.

• Logical/Discrete - The value to be controlled are easily described as on-off. e.g. the car motor is on-off. NOTE: all systems are continuous but they can be treated as logical for simplicity.

e.g. “When I do this, that always happens!” For example, when the power is turned on, the press closes!

• Linear - Can be described with a simple differential equation. This is the preferred starting point for simplicity, and a common approximation for real world problems.

e.g. A car can be driving around a track and can pass same the same spot at a constant velocity. But, the longer the car runs, the mass decreases, and it travels faster, but requires less gas, etc. Basically, the math gets tougher, and the problem becomes non-linear.

e.g. We are driving the perfect car with no friction, with no drag, and can predict how it will work perfectly.

• Non-Linear - Not Linear. This is how the world works and the mathematics become much more complex.

e.g. As rocket approaches sun, gravity increases, so control must change.

• Sequential - A logical controller that will keep track of time and previous events.

 

The difference between these control systems can be emphasized by considering a simple elevator. An elevator is a car that travels between floors, stopping at precise heights. There are certain logical constraints used for safety and convenience. The points below emphasize different types of control problems in the elevator.

Logical:

1. The elevator must move towards a floor when a button is pushed.

2. The elevator must open a door when it is at a floor.

3. It must have the door closed before it moves.

etc.

Linear:

1. If the desired position changes to a new value, accelerate quickly towards the new position.

2. As the elevator approaches the correct position, slow down.

Non-linear:

1 Accelerate slowly to start.

2. Decelerate as you approach the final position.

3. Allow faster motion while moving.

4. Compensate for cable stretch, and changing spring constant, etc.

Logical and sequential control is preferred for system design. These systems are more stable, and often lower cost. Most continuous systems can be controlled logically. But, some times we will encounter a system that must be controlled continuously. When this occurs the control system design becomes more demanding. When improperly controlled, continuous systems may be unstable and become dangerous.

When a system is well behaved we say it is self regulating. These systems don’t need to be closely monitored, and we use open loop control. An open loop controller will set a desired position for a system, but no sensors are used to verify the position. When a system must be constantly monitored and the control output adjusted we say it is closed loop. A cruise control in a car is an excellent example. This will monitor the actual speed of a car, and adjust the speed to meet a set target speed.

Many control technologies are available for control. Early control systems relied upon mechanisms and electronics to build controlled. Most modern controllers use a computer to achieve control. The most flexible of these controllers is the PLC (Programmable Logic Controller).

The book has been set up to aid the reader, as outlined below.

Sections labeled Aside: are for topics that would be of interest to one discipline, such as electrical or mechanical.

Sections labeled Note: are for clarification, to provide hints, or to add explanation.

Each chapter supports about 1-4 lecture hours depending upon students background and level in the curriculum.

Topics are organized to allow students to start laboratory work earlier in the semester.

Sections begin with a topic list to help set thoughts.

Objective given at the beginning of each chapter.

Summary at the end of each chapter to give big picture.

Significant use of figures to emphasize physical implementations.

Worked examples and case studies.

Problems at ends of chapters with solutions.