a closed loop feedback method for a manual bar …

105
A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR STRAIGHTENER ROBERT MIKLOSOVIC Bachelor of Electrical Engineering Cleveland State University June, 1996 submitted in partial fulfillment of requirements for the degree MASTER OF SCIENCE IN ELECTRICAL ENGINEERING at the CLEVELAND STATE UNIVERSITY August, 2001

Upload: others

Post on 08-Jun-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

A CLOSED LOOP FEEDBACK METHOD FOR

A MANUAL BAR STRAIGHTENER

ROBERT MIKLOSOVIC

Bachelor of Electrical Engineering

Cleveland State University

June, 1996

submitted in partial fulfillment of requirements for the degree

MASTER OF SCIENCE IN ELECTRICAL ENGINEERING

at the

CLEVELAND STATE UNIVERSITY

August, 2001

Page 2: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

This thesis has been approved

for the Department of Electrical and Computer Engineering

and the College of Graduate Studies by

________________________________________________

Thesis Committee Chairperson, Zhiqiang Gao

________________________________

Department/Date

________________________________________________

F. Eugenio Villaseca

________________________________

Department/Date

________________________________________________

Dan Simon

________________________________

Department/Date

Page 3: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

ACKNOWLEDGEMENTS

Many thanks go to my advisor, Dr. Zhiqiang Gao, who encouraged me to write

this thesis and taught me much of what I know about feedback control.

Thanks to Kenneth Dearborn of Dearborn, Inc. for providing me with this

problem, as well as the time and resources to work through its solution.

Thanks to William J. Lipkos for the many hours of teaching me many aspects of

the machine and machining practice.

Thanks to my brother, Dr. David S. Miklosovic, for his moral support and the

many hours he donated teaching me various concepts of physics and mathematics.

Thanks to Christine E. Twining for lending her time to help me with writing and

proof reading and for keeping me in good spirits and health.

Page 4: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

iv

A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR

STRAIGHTENER

ROBERT MIKLOSOVIC

ABSTRACT

Automation of a unique manually controlled industrial bar straightening machine

is proposed. Complexities of constructing a continuous time simulation model for the

event driven plant are discussed, as well as a method for closing the loop on a process

that involves a pulse width as the control variable. Three Simulink blocks are designed to

solve these modeling issues, and prove to be very flexible. The hardware configuration is

designed for future use as the controller, constructed, and used to initially acquire plant

data. Coefficients are derived for a transfer function. The system is simulated using a

Proportional-Derivative (PD) controller as well as a proposed nonlinear PD controller

(NPD). A nonlinear filter, the tracking differentiator (TD), is introduced as an alternate

means of providing an accurate feedback to the controller in the midst of noise, to

improve performance. The results from the NPD control technique prove to be more

robust than the PD controller while retaining the PD controller’s tuning simplicity.

Page 5: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

v

TABLE OF CONTENTS

Page

NOMENCLATURE........................................................................................................ vii

LIST OF TABLES ............................................................................................................ x

LIST OF FIGURES ......................................................................................................... xi

I INTRODUCTION......................................................................................................... 1

1.1 Background ................................................................................................. 2

1.2 Problem Formulation .................................................................................. 9

1.3 Research Methodology ............................................................................. 22

II A CLOSED LOOP CONTROL SOLUTION ......................................................... 25

2.1 Developing a Closed Loop Block Diagram.............................................. 26

2.2 Hardware Configuration ........................................................................... 30

III MODELING ............................................................................................................. 35

3.1 Modular Simulation Blocks ...................................................................... 36

3.2 Plant Modeling.......................................................................................... 41

3.3 Bend Timer and Decision Modeling......................................................... 47

IV CONTROL DESIGN................................................................................................ 49

4.1 PID Control Design................................................................................... 50

4.2 NPID Control Design................................................................................ 53

Page 6: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

vi

4.3 TD Feedback Design................................................................................. 56

V SIMULATION ........................................................................................................... 58

5.1 PD Controller Simulation ......................................................................... 59

5.2 NPD Controller Simulation....................................................................... 65

5.3 TD Feedback Simulation .......................................................................... 70

5.4 Results and Summary ............................................................................... 71

VI CONCLUSION......................................................................................................... 74

6.1 Future Research ........................................................................................ 75

REFERENCES................................................................................................................ 77

APPENDICIES ............................................................................................................... 78

Page 7: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

vii

NOMENCLATURE

TIR: Total indicator reading

: Vee block inclusion angle

n: Number of lobes of a part’s cross-section

d: Distance over which straightness is measured

B: Angular direction of the bow

|Bow|: Magnitude (distance) of the bow

R: Radius of the bar

IX: Maximum indicator reading

IN: Minimum indicator reading

OD: Outside diameter of the bar (2*R)

P: Path distance from the sensor to a theoretically straight part

IR: Sensor’s output signal (indicator reading)

P: Angular part position

Y: Sampled TIR

Y’: Rate of change of sampled TIR

BT: Bend time

BP: Bend command pulse

Page 8: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

viii

U: Bend control signal

r: Set point signal

TA: Actual TIR of the part

TA’: Actual TIR rate disturbance

T0: Initial TIR

T0’: Initial rate

Vr: Rotator velocity

Vf: Linear feed rate

Db: Bend distance

N: Roundness of the workpiece

TIR1: Initial TIR

TIR2: TIR immediately before the bend

TIR3: TIR immediately after the bend

TIR4: Final TIR

t1: Time before the bend

t2: Bend time; BT

t3: Time after the bend

R1: Initial rate

R2: Bend rate

Page 9: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

ix

R3: Resulting rate

TL: TIR limit

BTMIN: Minimum bend time

BTMAX: Maximum bend time

YST: Output sample time

RND: Roundness of the part

Page 10: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

x

LIST OF TABLES

Table Page

TABLE I: Comparison of the Transient Response .................................................... 72

TABLE II: Comparison Under Various Disturbances ................................................ 72

TABLE III: Comparison of Derivative Approximates ................................................. 73

Page 11: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

xi

LIST OF FIGURES

Figure Page

Figure 1: Diametric Size Measurements of Two and Three Lobed Parts .................. 3

Figure 2: A Simple Roundness Measurement ............................................................ 3

Figure 3: TIR using Vee Blocks with 90° and 60° Angles ........................................ 4

Figure 4: A Simple Setup to Measure Straightness over a Given Length, d.............. 5

Figure 5: An Example of a Part Bowed .002” @ 135° .............................................. 6

Figure 6: Plot of the Indicator Reading for one Revolution of the Part ..................... 6

Figure 7: Maximum and Minimum Indicator Readings of a Bowed Part .................. 7

Figure 8: A Manual Straightening Machine............................................................... 9

Figure 9: The Straightener Before Automation........................................................ 11

Figure 10: TIR Measurements with a Non-Contact Sensor ....................................... 11

Figure 11: Sensor Output vs. TIR over Five Revolutions .......................................... 12

Figure 12: Five Contiguous Locations where TIR is Sampled .................................. 12

Figure 13: The Machine during Straightening ........................................................... 13

Figure 14: Reference Signal from a .002” TIR Section ............................................. 14

Figure 15: Sensor Output with Additive Noise .......................................................... 15

Figure 16: Cylindrical and Spherical Focusing Configurations ................................. 16

Page 12: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

xii

Figure 17: Sensor Output from a Rough Surface Micro-Finish ................................. 16

Figure 18: Sensor Output of a Three-Lobed Part ....................................................... 17

Figure 19: Sensor Output of a Two-Lobed Part ......................................................... 17

Figure 20: Sensor Output from a .002” Undersize Spot on the OD........................... 18

Figure 21: Sensor Output from a .002” Oversize Spot on the OD............................. 18

Figure 22: Sensor Output from a Part Twisting in the Direction of Rotation ............ 19

Figure 23: Sensor Output from a Part Twisting in the Opposite Direction................ 19

Figure 24: A Strip Chart Recording from the Process ............................................... 20

Figure 25: The Open Loop Block Diagram................................................................ 27

Figure 26: The Operator Block................................................................................... 28

Figure 27: The SISO Plant Block............................................................................... 29

Figure 28: The SISO Closed Loop Block Diagram.................................................... 30

Figure 29: An Alternate Closed Loop Block Diagram............................................... 30

Figure 30: Hardware Configuration ........................................................................... 31

Figure 31: Open Loop Data Acquisition Hardware Configuration ............................ 32

Figure 32: Chart Recorder Settings for a .006” TIR Signal ....................................... 33

Figure 33: The TSH Simulink Block.......................................................................... 37

Figure 34: The Pulse Subsystem Simulink Block ...................................................... 39

Figure 35: The Pulse Simulink Block ........................................................................ 39

Page 13: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

xiii

Figure 36: The Pulse Width Simulink Block ............................................................. 40

Figure 37: Dissection of a Strip Chart Clipping......................................................... 42

Figure 38: Plot of the Actual Plant Data .................................................................... 43

Figure 39: Plot of the Calculated Plant Data .............................................................. 45

Figure 40: The Plant Simulink Block......................................................................... 46

Figure 41: The Bend Timer Simulink Block.............................................................. 47

Figure 42: The Decision Simulink Block................................................................... 48

Figure 43: The Closed Loop Model with a PD Controller......................................... 51

Figure 44: The fal Function for 0<a<1 and a>1 ......................................................... 54

Figure 45: The fal Simulink Block............................................................................. 54

Figure 46: The Closed Loop Model with the NPD Controller................................... 56

Figure 47: The TD Simulink Block............................................................................ 57

Figure 48: The Closed Loop Model with a TD .......................................................... 57

Figure 49: The PD Closed Loop Configuration ......................................................... 59

Figure 50: The PD Controller Simulation .................................................................. 60

Figure 51: PD Simulation of an Out-Of-Round Part.................................................. 61

Figure 52: PD Simulation of a 30 Second Y Sample Time........................................ 61

Figure 53: PD Disturbance Test Configuration.......................................................... 62

Figure 54: PD Rate Disturbance Simulation .............................................................. 63

Page 14: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

xiv

Figure 55: PD Rate Disturbance Plus Noise Simulation............................................ 63

Figure 56: PD Feedback Noise Simulation ................................................................ 64

Figure 57: PD Simulation with All Disturbances....................................................... 64

Figure 58: PD Simulation with Y0 = .003” ................................................................ 65

Figure 59: The NPD Controller Configuration .......................................................... 65

Figure 60: The NPD Controller Simulation ............................................................... 66

Figure 61: NPD Simulation of an Out-of-Round Part................................................ 66

Figure 62: NPD Simulation of a 30 Second Y Sample Time..................................... 67

Figure 63: NPD Rate Disturbance Simulation ........................................................... 67

Figure 64: NPD Rate Disturbance Plus Noise Simulation ......................................... 68

Figure 65: NPD Feedback Noise Simulation ............................................................. 68

Figure 66: NPD Simulation With All Disturbances ................................................... 69

Figure 67: NPD Simulation with Y0 = .003”.............................................................. 69

Figure 68: Second Order Approximate Derivative Configuration ............................. 70

Figure 69: Tracking Differentiator Configuration...................................................... 71

Page 15: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

1

CHAPTER I

INTRODUCTION

Necessity is the mother of invention. Time and again complexity seems to

increase the closer one looks at a particular subject, regardless of how trivial it first

appears. This seems especially true when attempting to solve a problem. Most

equipment and machinery is composed of many interesting parts with varying shapes and

sizes, which work together to get a specific job done. Even more fascinating to the

untrained eye is the unexpected diversity of tasks occasionally needed to make each part.

Oftentimes a piece of metal travels through several machining processes, each having

multiple operations, to produce the finished visible part. One process in particular is the

ability to straighten cylindrical parts before and after they are machined into shafts and

other parts. In this chapter, the basic concepts needed to understand straightening metal

bars are discussed. A specific manually operated straightening machine is examined,

followed by the industrial practice of automating a manually controlled machine.

Page 16: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

2

1.1 Background

Precision straightening of a cylindrical metal bar is largely based on the ability to

precisely measure its geometry. A few fundamental measurements and how each

influences the tolerance specification on straightness should first be understood. Methods

for measuring diametric size, roundness and straightness will be covered to lay the

groundwork for the problem formulation.

Measuring Roundness

Roundness is a quantity derived from comparing the shape of a cross sectional

area at one distinct point along a cylinder’s length against a circle. A round metal bar is

generally long in length with respect to diameter, meaning the overall roundness of the

part has to be checked in many locations along its length and averaged to insure

consistency. Simple measuring tools can be used to roughly approximate the roundness,

or more specifically, the out-of-roundness of a work piece.

A simple method for checking roundness with a caliper is by rotating the part to

measure its diametric size at multiple angular positions. This is repeated several times

along the part’s length. Taking the difference between the minimum and the maximum

size at each location indicates the ovality of the part. This technique only works for even

lobed parts where opposing lobes are located directly across the diameter from one

another [1]. In Figure 1, a two-lobed part can accurately be measured to have an ovality

of .500”, but a three-lobed part falsely measures to be perfectly round. With an odd

number of lobes, the measurement is not a local maximum, and there is no way to ensure

all readings are taken directly through the centroid of the part [2]. This is especially true

Page 17: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

3

when checking for roundness within a few thousandths on an inch, which is usually the

case. (Some figures are exaggerated for clarity.) In the case of the three-lobed part in

Figure 1, some measurements miss the center as much as .017”.

Figure 1: Diametric Size Measurements of Two and Three Lobed Parts

Supporting the work piece on two points in a Vee (shaped) block while rotating it

under a dial indicator will also detect variations in size, as illustrated in Figure 2. Taking

the difference between the minimum and maximum readings in this case is referred to as

the total indicator reading (TIR) [1].

Figure 2: A Simple Roundness Measurement

Page 18: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

4

Figure 3 illustrates how Vee blocks with different inclusion angles yield different

TIR measurements for the same part. For accurate results, the angle should be:

n

°−°= 360180α (1.1)

where n is the number of lobes and α is the Vee inclusion angle [2].

Figure 3: TIR using Vee Blocks with 90° and 60° Angles

The number of maximum and minimum indicator readings per revolution is equal

to the number of lobes. Although ovality and TIR implicate out-of-roundness, actual

roundness is measured with an expensive form-testing machine. It is comprised of a

high-precision spindle that rotates the work piece to calculate the location of its centroid,

adjusts for tilt, rotates the part axially through the centroid, and takes difference readings

against a calculated theoretical circle [3,4]. The TIR estimates of roundness suffice in

showing how deviations in roundness along the length of a cylindrical part affect the

straightness measurement of it.

Measuring Straightness

Straightness is a quantity derived from comparing the axial centerline of a specific

section of a cylinder’s length against a straight line. A simple method for checking

Page 19: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

5

straightness is by supporting the work piece with two Vee blocks a distance, d, apart.

The indicator must be centered between them, as opposed to measuring for roundness

where the work piece is supported directly below the indicator by one Vee block. Figure

4 illustrates a typical test setup for straightness.

Figure 4: A Simple Setup to Measure Straightness over a Given Length, d

The distance that the axial centerline of the part deviates from a theoretically

straight centerline directly below the indicator equals the extent to which the work piece

is bowed (warped) over length d. This quantity contains a direction and a magnitude.

Each is explained separately.

The direction of the bow, θB, can be determined in the following way: As the

work piece sits in the Vee blocks, a timing mark can be arbitrarily placed on it to create a

visual radial reference. The angular direction of the bow is measured with respect to this

relative zero-degree reference. Figure 5 illustrates an example of a bar that is bowed

.002” @ 135° with respect to its reference. However arbitrary, a reference is important

when attempting to straighten a work piece, especially when it is bent in several different

directions along its length.

Page 20: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

6

Figure 5: An Example of a Part Bowed .002” @ 135°

The magnitude of the bow, |Bow|, can be determined as follows: When the

bowed part in Figure 5 is rotated one revolution at a constant speed, the indicator’s

reading will fluctuate in a sinusoidal fashion, as shown in Figure 6. Assuming the part is

round at the locations over the Vee blocks and under the indicator, the maximum and

minimum will be 180 degrees apart from each other. Deviations in roundness at any of

the three locations detract from the accuracy of the straightness reading by distorting the

shape of sinusoid. Sources of deviation are discussed in detail in Section 1.2.

Figure 6: Plot of the Indicator Reading for one Revolution of the Part

In Figure 7, the maximum and minimum indicator readings are shown to be:

IX = R + |Bow (1.2)

Page 21: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

7

IN = R – |Bow| (1.3)

where

IX: Maximum indicator reading

IN: Minimum indicator reading

R: Radius of the bar (part)

|Bow|: Distance (magnitude) the part is bowed

Figure 7: Maximum and Minimum Indicator Readings of a Bowed Part

In the case of measuring straightness, the difference between IX and IN is also

referred to as the total indicator reading (TIR). TIR will determine |Bow| by the

following equations:

TIR = IX – IN = (R + |Bow|) - (R – |Bow|) = 2*|Bow| (1.4)

|Bow| = ½ TIR (1.5)

Page 22: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

8

In review, the bow (out-of-straightness) of the part has a direction (θB) and a

magnitude (|Bow|). The direction of the bow is the angular position that IX is measured

with respect to a zero-degree reference on the work piece. The magnitude of the bow is

half of the TIR.

The procedure for measuring straightness is as follows: The part is rotated at least

one revolution, to calculate TIR, and stopped when IX is visible on the indicator. This

position is demonstrated in the top illustration of Figure 7. In this position, it is known

that the section of bar between the Vee blocks is bowed upwards (direction) half of the

TIR (magnitude). To insure perfect over-all straightness, a bar’s length can be repeatedly

divided up into any number of sections and checked for straightness. For example, a

twelve foot bar can typically be checked for straightness every foot, then again every

three feet, and once over-all.

The Straightening Process

The straightening process simply involves correcting any error while checking for

straightness, and can be broken into steps. First, the part is rotated at least one revolution,

to calculate TIR, and stopped when IX is visible on the indicator. This position is

required because the bow is upward, 180° in relation to the Vee blocks. Second, the

rotation is locked and a bending force replaces the indicator. The bending force can be

any form of mechanical advantage such as a lever, screw, or piston. Third, the Vee

blocks act as bending moments, opposing the bending force to straighten the part. The

objective is to momentarily displace the bow past theoretical center (more than half of the

TIR) so that it will yield at theoretical center when the bending force is released. Last,

TIR is re-measured. If it is within a specified tolerance, then the part is advanced

Page 23: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

9

lengthwise to straighten an adjacent section. If it is still out of tolerance, then the section

is re-straightened. A typical manual straightener is pictured in Figure 8, where the

indicator is positioned under the part so that the bending force can be exerted without

moving components.

Figure 8: A Manual Straightening Machine

1.2 Problem Formulation

The first step toward a sound solution is a clear understanding of the problem. A

description of the mechanics and operation of the straightening machine are given,

followed by related complications. Reasons for automation are then discussed.

Machine Layout and Operation

The current machine (the straightener) operates on the principles outlined in the

previous section, but with a few innovations. The first innovation is that the parts are

ground before being straightened. This creates a part with a smooth surface micro-finish,

Page 24: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

10

a high degree of roundness, and a consistent outside diameter (OD), allowing the

machine to straighten with more precision. The manner in which these conditions affect

straightness is covered in the following section.

The second innovation is that the part slowly spirals through the machine like a

screw. The long bar (work piece) is rotated by one motor while continuously fed

lengthwise by a second motor. This way, the work piece advances a small amount with

each revolution until it is completely fed through the machine. When the bar is fed

slower with respect to rotation rate, smaller changes occur in TIR between adjacent

revolutions, because straightness changes monotonically. Also, more spots are checked

for straightness along the length of the part, because the revolutions are closer together.

The operator has the ability to calculate TIR during one revolution and straighten during

the next. If the part fails to yield where it should when straightening, it is rechecked in

the following revolution. Once the bar is straightened the first time, the operator needs

only to keep it straight, making for a straightforward regulator control problem.

To minimize wear on the surfaces that make contact with the part, each Vee block

is replaced with two rollers, and the dial indicator is replaced with an ultrasonic position

sensor. The ultrasonic gage measures the position of the part’s surface without making

contact with it. Figure 9 illustrates the machine before automation.

Page 25: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

11

Figure 9: The Straightener Before Automation

Figure 10 shows how the relationship between |Bow| and TIR is similar to that in Figure

7, regardless of where the indicator reading is taken from.

Figure 10: TIR Measurements with a Non-Contact Sensor

The sensor output (indicator reading) and the actual TIR of the part become

continuous signals as a result of continuously feeding the part, yet they differ in the

following way: The sensor output signal, IR, consists of the actual TIR, TA,

Page 26: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

12

superimposed on a sine wave, due to the rotation of the bar. The operator must derive

samples of the actual TIR each revolution from IR. Figure 11 displays the signals for a

case where TIR increases from zero to .002” in five revolutions. The operator-sampled

TIR, Y, lags IR by at least one revolution, the minimum TIR sample time. Figure 12

shows five locations along the part that the operator has derived TIR samples for in five

contiguous revolutions.

Figure 11: Sensor Output vs. TIR over Five Revolutions

Figure 12: Five Contiguous Locations where TIR is Sampled

Page 27: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

13

There are two operator readouts: a digital readout and a clock face. The digital

readout displays the calibrated measurement (IR) from the sensor. The clock face shows

the part’s angular position, θP, as it rotates. Once the part is placed in the machine, it

inherits the zero-degree reference position of the clock. The operator uses the readouts to

track the magnitude (TIR) and direction (clock position) of the bow each revolution.

Trends that can assist in deciding whether or not to straighten are analyzed in the

following section.

Each revolution, the operator observes the digital readout to mentally calculate Y

and notes the clock position when IX appears on the digital readout (θB). As Y steadily

increases to approach a specified TIR limit, TL, he or she programs a bend timer in

proportion to Y and the rate it is increasing, Y’. The operator then pushes a button to

immediately stop rotation with the bow facing upward at the noted clock position (θB).

While the part continues to feed through the machine, the air cylinder actuates downward

to straighten it for the preset period of time, BT, set by the bend timer. When the time is

expired, the air cylinder releases, the part begins to rotate again, and the process

perpetuates. Figure 13 illustrates the straightening event.

Figure 13: The Machine during Straightening

Page 28: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

14

All process variables (tabulated in the following chapter) are kept constant for the

operator with the exception of BT and the decision of when to bend, BP.

Process Limitations

In theory, the sensor’s output can remain at a constant P when the bar is perfectly

straight (Figure 10). The truth is that it has never happened. Fact is definitely stranger

than fiction, and not many things are perfect. In this case, there are many disturbances to

obscure the perfect signal and limit a person from keeping a part straight within a

specified tolerance (close to zero) at an acceptable speed. Limitations attributable to the

ultrasonic sensor, part roundness, continuous feeding, a twisted part condition, and the

digital readout are discussed, as well as how they affect IR, the operator’s performance,

and the bound on straightness. Figure 14 exhibits a disturbance-free IR measured from a

section of bar possessing .002” TIR. It is used as a reference.

Figure 14: Reference Signal from a .002” TIR Section

The use of an ultrasonic sensor in place of the indicator is a definitive step

towards eliminating contact-wear, and creating a direct analog output for use as a

controller input. Conversely, the negative attributes are signal noise, fluctuations due to

inconsistent material density, and sensitivity to the part’s surface finish. At times, a

Page 29: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

15

certain amount of radio-frequency-interference (RFI) noise from surrounding equipment

infiltrates the sensor output, as shown in Figure 15.

Figure 15: Sensor Output with Additive Noise

Although the ultrasonic unit is equipped with a low pass filter and an averaging

circuit to help suppress momentary spikes, the operator occasionally contends with

blanking of the digital readout during heavy noise intervals.

The ultrasonic unit operates in a similar fashion to that of radar, in that the

ultrasonic beam is transmitted from and received by the transducer (sensor), traveling

round-trip to and from the part by reflecting off of its surface half way. The measured

focal length of a transducer is dependent on the density of the material in which it is

being measured [5]. The unit cannot measure accurately in the presence of a time-variant

material density (hard spots). Consequently, the operator is obligated to spot sudden

unnatural shifts in TIR, knowing that TIR must change monotonically.

The geometry of the transducer face characterizes its type-of-focus and

performance. Figure 16 illustrates two transducer types. A trade-off exists: One is well

suited for its immunity to the part’s surface finish, and the other is well suited for

resolution. For this reason, the appropriate transducer is selected during setup. A

Page 30: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

16

cylindrical (line) focus is complementary to the geometry of the cylindrical part being

measured. This helps to average the effects of a rough micro finish, but sacrifices a small

amount of sensitivity.

Figure 16: Cylindrical and Spherical Focusing Configurations

Sensitivity is convenient when tuning out noise. A spherical (point) focus is

commonly used to improve sensitivity, but exposes small flaws (surface finish) easier.

Illustrated in Figure 17, a rough micro-finish affects the signal much like noise, but with

a few distinct differences. Its magnitude and average frequency are proportional to the

roughness of the part. One of the reasons for pre-grinding the bars prior to straightening

is to accommodate the operator with a smoother signal.

Figure 17: Sensor Output from a Rough Surface Micro-Finish

Page 31: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

17

The second set of limitations stem from the roundness of the work piece under the

sensor. As discussed in Section 1.1, a bar with an out-of-round condition has a positive

non-zero number of lobes (maxima and minima per revolution). In a straightness

measurement, this condition superimposes another sine wave into IR, at a frequency-per-

revolution equal to the number of lobes. Figure 18 shows increasing and decreasing TIR

of a three-lobed part that is out-of-round .001”. It is apparent how the true IX and IN are

undistinguishable under, say, .002” TIR and more defined as TIR increases. Roundness

puts a bound on straightness and is only a factor for the operator near zero. Figure 19 is

similar to Figure 18, except with a two-lobed part.

Figure 18: Sensor Output of a Three-Lobed Part

Figure 19: Sensor Output of a Two-Lobed Part

Page 32: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

18

Grinding the OD of the parts prior to straightening ensures a degree of roundness

within a tolerance. As with all machining processes, the cost to grind is largely based on

how tight the tolerances need to be. In order to keep the grinding costs down, a bit of

micro-finish, roundness, and size deviation from the outside vendor is accepted.

The third limitation originates when the part continuously spirals through the

machine. Any change in diameter or shape from one revolution to the next will affect the

nominal path-length between the sensor and part, thus causing the signal to fluctuate. A

section with an undersize OD shifts IR upwards, where an oversize section shifts IR

downwards. These disturbances are pictured in Figures 20 and 21, respectively.

Figure 20: Sensor Output from a .002” Undersize Spot on the OD

Figure 21: Sensor Output from a .002” Oversize Spot on the OD

Page 33: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

19

The fourth limitation originates from a phenomenon known as a twisted part

condition. When the part twists, θB slowly moves a little in one direction with each

revolution, even if the TIR remains constant over time. In this case, the operator triggers

a straighten event 30 to 45 degrees from θB in the angular direction of the twist’s

movement. A twist in the direction of rotation shows up at the sensor’s output as a

frequency decrease (Figure 22), where a twist in the opposite direction shows up as a

frequency increase (Figure 23). It is also theoretically possible for a part having a twist

with a pitch complementary to the machine’s feed-per-revolution ratio to screw itself

through the machine undetected.

Figure 22: Sensor Output from a Part Twisting in the Direction of Rotation

Figure 23: Sensor Output from a Part Twisting in the Opposite Direction

Page 34: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

20

The final set of limitations stem from the use of a digital readout to monitor IR.

As a result, the number of digits displayed has a deleterious effect on operator

performance. Due to round-off error, a three-place decimal changes slow enough to be

intelligible to the operator, but lacks precision needed to precisely locate IR. This masks

the recognition of small changes in θB needed to detect a twist. It also facilitates

straightening slightly off the correct angular position, actually creating a twist. On the

other hand, a four-place decimal produces the needed precision, but changes too fast to be

intelligible, unless the rotator is slowed way down. A slower rotation means a slower

feed, which would counter-productively slow down the process. It is also difficult for the

operator to simultaneously monitor two constantly changing gages of different types, one

analog (clock) and one digital (indicator reading).

Oftentimes, more than one of the previously mentioned complications affects the

sensor output signal (IR) at any given time. A strip chart recording from the process is

shown in Figure 24. Small amounts of out-of-roundness, fluctuations in OD, and micro-

finish are visible.

Figure 24: A Strip Chart Recording from the Process

Page 35: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

21

The Need for Automation

The performance of the machine is largely based on the performance of the

operator. He or she must calculate Y and have a sense its rate of change with every

revolution in the midst of the following challenges:

1. Digital readout blanking from excessive noise intervals

2. Sudden shifts in TIR when the material density is inconsistent

3. Dealing with an out-of-round work piece under .002” TIR

4. Oversize and undersize rings in the OD of the part

5. Being able to detect a twisted part condition

6. Straightening at the exact point without creating a twist

7. Watching analog and digital gages simultaneously

Replacement of the operator with some electronic hardware is beneficial in the

following ways:

1. The cost of the electronics is much less than the ongoing hourly wage and

schedule of the operator.

2. The limitations associated with the digital readout are eliminated. This

helps the machine to straighten faster with more precision.

3. The process can be drastically sped up to increase production. Though the

minimum sample time is one revolution (the time it takes to calculate

TIR), the revolution does not need to be slow enough for human

comprehension.

Page 36: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

22

4. An inexpensive PLC (programmable logic controller) can make several

calculations and test the result against a set of rules many times faster than

a human being. Nowadays, a typical PLC has a scan time approaching the

microsecond range.

5. The controller can be tweaked to make no mistakes. The aim is to trust

the machine and controller enough to eliminate the task of having to 100%

final inspect every part and then re-straighten a certain percentage.

The cost of straightening is based on how tight of a tolerance the machine can

hold, and the profit is based on operating costs and the speed at which the process is

performed. The goal is to design a closed loop control that will hold tighter tolerances,

eliminate the operator, and straighten as fast as the machine will allow. When

incorporating multiple straightening machines, the benefits will increase exponentially.

1.3 Research Methodology

The methodology used to research a control problem depends on a few deciding

factors, the first being whether or not the problem has been studied before. If it has been

considered, the traditional method is to gather as much information as possible about the

process, study and compare all previous control solutions, propose a new control

solution, model the system, design a controller based on the new control solution,

simulate the system, and compare the results with the previous solutions. Given that the

problem is known, the system model is usually already well defined. The emphasis is on

Page 37: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

23

the implementation of a new control solution. Gao and Huang [6] presented a new error-

based control design framework including such innovations as a nonlinear tracking

differentiator (TD), a nonlinear proportional-integral-derivative (NPID) control method,

and active disturbance rejection (ADRC). Jiang [7] proposed a novel feedback control

approach to a class of ABS brake problems involving a systematic cascade control

structure that implemented the NPID as a control solution.

If the problem has not been previously researched, an alternate plan-of-attack is to

gather as much information as possible about the process, study the process and

formulate a solution based on specified design goals, produce a straightforward block

diagram by breaking the problem down into several more manageable sub-problems,

model the process, propose a control method, simulate the system, and discuss the results.

The emphasis is split between modeling and implementation of a control method. Since

the bar straightener to be automated is proprietary, its automation has not been attempted

before.

The second deciding factor is whether or not the process is strictly manual or

manually controlled. Some machines are strictly manual, meaning the operator is

physically involved in the process. To automate this type of machine, mechanics (to

replace the operator’s involvement) along with a control system must be designed. Other

machines are manually controlled, meaning the operator controls the process through an

operator interface. In this case, the machine needs only a controller, possibly a few

sensors, and a simplified operator interface. This distinction is important in deciding how

the problem is handled. If the bar straightener were strictly manual, the focus of the

research may be on finding the best way to automatically straighten bars, since all new

Page 38: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

24

hardware would be needed anyway. Furthermore, small companies have limited

resources and push for methods of control that are inexpensive, powerful, and easy to

tune. Even though the determination of Y is based on a set of rules, an inexpensive PLC

may be better suited for tuning by shop floor technicians than a fuzzy logic controller

(FLC). In the real industrial world, a total machine overhaul with state-of-the-art

components may be justified only if the benefits outweigh the costs.

This machine, however, is a manually controlled machine. Hence, a thorough

knowledge of the problem, a bit of time, and a handful of electronics is sufficient for

automation. The methods outlined by Gao and Huang [6] prove to be powerful and

simple to tune, which are ideal for use in an industrial environment. The automated

machine is simulated with a proportional-derivative (PD) controller and a nonlinear PD

(NPD) controller so that the performance of each can be compared and tabulated

Page 39: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

25

CHAPTER II

A CLOSED LOOP CONTROL SOLUTION

The task of automation can begin once the process is well defined. A critical step

toward closing the loop on an industrial process is developing a straightforward system

block diagram. This can be attempted after the machine’s theory of operation is clearly

understood. From this, each block is modeled for simulation. In this chapter, the plant

and controller blocks are specified and the diagram is reduced to a usable single-input-

single-output (SISO) form. Next, a control structure is chosen to best suit the machine.

Finally, the controller’s physical considerations are addressed. The electronic hardware

needed to successfully close the loop is chosen according to cost and function, including

data acquisition electronics. Although data acquisition is an essential step in the

determination of the plant’s transfer function, hardware needs associated with it are

commonly overlooked. The electronic hardware is used for data acquisition in this

research effort, and will be implemented as the hardware controller in the future.

Page 40: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

26

2.1 Developing a Closed Loop Block Diagram

With a block diagram, the task of modeling is reduced because each block is well

defined and modeled separately. The block diagram initially starts as a crude

representation of the open loop process. The connecting signals and each of the blocks

are defined, manipulated and organized until they represent a sensible SISO closed loop

block diagram that can be accurately modeled.

The Open Loop Block Diagram

Figure 25 shows a block diagram of the open loop straightening process explained

in Section 1.2 where the connecting signals are defined as:

IR: Indicator reading (sensor output)

P: Part’s angular clock position

BT: Bend time

BP: Bend command pulse

U: Bend control signal

r: Set point signal

TA’: Actual TIR rate disturbance

Y: Sampled TIR

Y’: Rate of sampled TIR

This is referred to as an operator-in-the-loop process because the operator acts as

the controller to close the loop.

Page 41: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

27

Figure 25: The Open Loop Block Diagram

The process block, representing the straightening process, is a multiple-input-

multiple-output (MIMO) system. It has two inputs, two outputs, a few constants, and a

few initial conditions. Since the actual TIR of the work piece (TA) is unknown, it is

modeled as the disturbance through input TA’. The other input, U, is the bend signal.

When U is present (non-zero), the machine stops rotating and counter-bends the part for

BT seconds. When U is absent (zero), the machine releases the air cylinder and resumes

rotation. IR and P are outputs connected to a digital readout and a clock face that the

operator uses to interpret the actual TIR from. The following constants and initial

conditions are associated with the process block:

Vr: Rotator velocity [revolutions-per-minute]

Vf: Linear feed rate [inches-per-minute]

Db: Bend distance [inches]

N: Roundness of the workpiece [inches]

T0: Initial actual TIR [inches]

T0’: Initial rate [inches-per-inch]

Page 42: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

28

The operator block, representing the function of the operator, can be more clearly

defined when it is broken down into smaller blocks, as shown in Figure 26. The operator

calculates the sampled TIR (Y) and compares it to a set point (r) of zero, typical to that of

a regulator problem. The decision block produces a momentary bend command pulse,

BP, when the error reaches a specified limit (TL). TL is handled as an initial condition.

Figure 26: The Operator Block

The control law for BT has never been quantified before. But since the operator

intuitively sets a bend time based on Y and Y’, it is only natural for the controller block

to produce a continuous bend time value (BT) proportional to that of the error and the

derivative of the error. For this reason, a PD and an NPD controller are chosen for

simulation. Furthermore, a control structure that is error-based (and not model-based) is

more resilient to model uncertainties and easier to tune by shop-floor technicians because

the design parameters have direct physical meanings [6].

Page 43: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

29

The bend timer block in Figure 25 produces the bend control signal, U. U is a

pulse that is triggered by the bend decision BP, and has a magnitude equal to the sign of

BT and a pulse width equal to the absolute value of BT.

The Closed Loop Block Diagram

The SISO plant, shown in Figure 27, can be extracted from the open loop block

diagram by combining the process block in Figure 25 with the ‘sample TIR’ block in

Figure 26. This will allow the open loop block diagram to be reduced to a SISO closed

loop block diagram.

Figure 27: The SISO Plant Block

The function of the ‘sample TIR’ block is to compute the difference between IX

and IN each revolution and hold it until it is recalculated for the next revolution. There is

also a small set of rules, based on the process limitations outlined in Section 1.2, for

which each sample is tested against. The use of an inexpensive PLC is ideal to perform

these tasks. It is also cheaper and more familiar to technicians than a fuzzy logic

controller. The focus of modeling is on the plant’s single input and single output, and the

fact that it is an event-driven process. For this reason, TIR calculation will be implicit in

the plant model.

Page 44: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

30

Figure 28: The SISO Closed Loop Block Diagram

The SISO closed loop block diagram can now be drafted (Figure 28). Given that

the controller is using the error and its derivative, the block diagram can be rearranged

according to Figure 29 where Y and Y’ are driven to zero independently. This allows for

controller design flexibility.

Figure 29: An Alternate Closed Loop Block Diagram

2.2 Hardware Configuration

The primary considerations for hardware selection are to choose readily available

and readily usable equipment while keeping costs reasonable. A PLC is chosen for both

data acquisition and controller functionality. This hardware consolidation allows for the

selection of fewer components at a higher quality. The short list of major components

chosen includes a PLC, a strip chart recorder, an encoder, and a few knobs and switches.

Page 45: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

31

Controller Hardware

Hardware needed to automate the bar straightener can be satisfied by the

implementation of a PLC and an encoder. The use of a PLC is a solid hardware choice

due to its modularity and wide range of available input-output (IO) modules. For

example, this implementation requires seven different forms of IO. A 24-volt dc digital

IO module is wired to the operator interface, while a 110-volt ac digital IO module

controls the power to each component. An encoder input module is needed for the

encoder and an RS-232 port on the PLC’s processor feeds the ultrasonic unit. A 0-10

volt analog output supplies the strip chart recorder.

Since the feedback path is visual to the operator (in manual operation), an encoder

is added to the clock face to feed P back to the PLC. The ultrasonic unit (sensor) is

equipped with an RS-232 output to feed IR back to the PLC. The future function of the

controller hardware is illustrated in block-form in Figure 30.

Figure 30: Hardware Configuration

Page 46: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

32

Data Acquisition Hardware

A process cannot be modeled without some form of data acquisition. Hardware

needed to take data can be satisfied by the implementation of a PLC and a strip chart

recorder. Since the manual process is slow, a strip chart recorder is an appropriate

choice. It provides the operator with a better way to monitor IR until the machine

becomes automatic. Once automation occurs, the chart recorder can continue to be used

by technicians to monitor IR for tuning and trouble-shooting purposes. Nothing is

wasted.

Figure 31: Open Loop Data Acquisition Hardware Configuration

The PLC is again utilized to feed the strip chart recorder with a pre-calibrated

signal (Figure 31). Instead of purchasing a chart recorder with continuously variable gain

and offset potentiometers, the PLC conditions the sensor output (IR) into three pre-

calibrated ranges. This simplifies calibration for the operator and removes room for error

during data acquisition. The operator is given two controls for chart calibration: a four-

digit thumbwheel to center IR on the chart and a three-position selector switch to scale IR.

The thumbwheel limits the chart offset to .001” increments. Its setting also allows the

Page 47: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

33

operator to view the center-of-chart indicator reading at a glance. The three-position

selector switch allows the operator to set the chart to span .005”, .010”, or .020”. Figure

32 shows an example of a .006” TIR signal scaled on the strip chart recorder.

Figure 32: Chart Recorder Settings for a .006” TIR Signal

The strip chart recorder in place of the digital readout and clock proved to

eliminate many of the process limitations previously discussed in section 1.2. It allows

the operator to monitor one continuous sinusoidal wave without having to remember

numbers while doing mental calculations. Monitoring one display eliminates the operator

fatigue associated with watching analog and digital displays simultaneously. This is

possible because the chart shows a history, where the separate gages are momentary in

nature.

While taking data, the operator did not encounter the twisted part condition.

There can be two possible reasons for this occurrence. The first possibility is that the

operator may encounter the condition at some point, but without knowing. It is difficult

to detect a frequency shift on the strip chart recorder without increasing the chart speed.

However, the angular direction should not matter as long as the part is straight within a

specified tolerance. The second possibility is that the operator caused all prior

occurrences of the twisted part condition, by failing to straighten exactly on θB. The

Page 48: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

34

strip chart recorder has a higher viewing resolution than a digital readout, allowing the

operator to bend the part exactly on θB without causing further twist. Since there were no

twists, only data from IR was taken. Angular direction information is not needed from

data acquisition because the goal is to bend the part exactly on θB.

Page 49: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

35

CHAPTER III

MODELING

From the block diagram generated in the last chapter, each block is separately

modeled for simulation. This particular process presents the following modeling

challenges: The plant is event-driven and the controller is a continuous function of time.

Since the system is modeled in the continuous time environment of Simulink and the

control variable is a timed pulse, a few special blocks are designed. In this chapter, the

design of a triggered sample-and-hold (TSH) block, a pulse block, and a pulse width

block are discussed. Next, the plant is modeled utilizing these blocks. This is

accomplished by scientifically solving a system of equations as well as drawing on the

operator’s intuition. Finally, the decision and bend timer blocks are addressed and

modeled.

Page 50: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

36

3.1 Modular Simulation Blocks

In order to simulate the closed loop process in Simulink, three special blocks were

created. The TSH block samples a signal on the rising edge of an enabling pulse and

holds the sampled value constant at the output until the block is re-enabled. The pulse

block creates a one-unit pulse having a pulse width equal to the sampled input value,

converting a constant value to time. The pulse width block produces a constant value

equal to the width of the input pulse, converting time to a constant value. The functions

of each are explained in detail.

Triggered Sample-and-Hold (TSH) Block

The plant’s output and rate immediately after the part has been straightened is

dependent on BT, Y, and Y’, all of which occur over different time intervals. The

function of the TSH block is to sample a value during one time interval so that it can be

used during another. The block basically samples the input for a small period of time on

the rising edge of an enabling pulse, and then holds that value constant at the output until

the block is re-enabled. In Simulink, a constant value can be maintained by building an

integrator’s output to the desired value, then forcing it to stop integrating by feeding the

integrator’s input with zero. The TSH block operates on the following principle:

XdttxT

T

=∫0

)(1

(3.1)

where

x(t) is the input signal

Page 51: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

37

T is very small (.05 sec.) with respect to the process time

X is the output equal to the time average of x(t) over (0< t <T)

t(0) is triggered by the rising edge of the enabling pulse

The significance of this equation is that only T needs to be known ahead of time.

If x(t)/T is integrated for T seconds, the output will be a constant X. In Simulink, x(t)

needs only to exist while it is being integrated for T seconds over the interval (0< t <T).

This is done in the top line of Figure 33. After this, the integrator is forced to stop

accumulating by the line below it and maintains a constant output of X for t > T. As T

approaches zero, X = x(t) at a single point. If x(t) is not constant while the integrator

accumulates over the short interval (0< t <T), then it is time averaged.

Figure 33: The TSH Simulink Block

Page 52: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

38

The line directly below the top line in Figure 33 is a T-second timer used to

control the time interval of the accumulating integrator in the top line. It operates on a

similar but different principle:

11

0

=∫T

dtT

(3.2)

where it takes T seconds to integrate 1/T to 1 and then it stops integrating. In conjunction

with a relay, it creates a T-second pulse. This integrator produces a time period by being

controlled by its output reaching a value of 1, where the integrator in Equation 3.1

produces a value by being controlled by time.

Any incoming enabling pulses are ignored and the output is zeroed during the

sampling period (0< t <T). The enabling pulse is quanitized to either zero or one, and its

rising edge resets the integrators to zero at the instant they start accumulating. The lower

integrator uses the state output for determining the integrator resets and to break algebraic

loops produced by Simulink.

Pulse Block

The bend timer has to be able to convert BT from a value into the timed pulse U.

The pulse block was designed for this purpose. It creates a pulse that has a magnitude

equal to the sign of the input and a pulse width equal to the input’s absolute value.

Page 53: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

39

Figure 34: The Pulse Subsystem Simulink Block

The heart of the pulse block is the pulse subsystem block, shown in Figure 34. It

operates on the principle:

1)(

1

0

=∫ dttx

X

(3.3)

where it takes X seconds to integrate 1/x(t) to 1. This is similar to Equation 3.2, but it

produces an X-second pulse. The sign of the output pulse is made equal to the sign of the

input value. A negative input produces a –1 pulse, and a positive input produces a +1

pulse. The reciprocal block generates a divide-by-zero error whenever its input is zero.

Consequently, the reciprocal block needs to be isolated in a subsystem that is only

enabled when supplied with a non-zero value.

Figure 35: The Pulse Simulink Block

Page 54: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

40

Figure 35 shows the main pulse block, where the pulse subsystem block (Figure

34) resides. A TSH block captures an input value over a short period of time (T) so that

the subsystem can integrate a constant value over a longer period of time (the pulse

width). To ensure that the subsystem is supplied with a non-zero value, the subsystem is

only enabled if the value is larger than some minimum, BTMIN. The bend timer uses the

state output of the integrator to ignore incoming bend pulses while it is timing, and to

break algebraic loops produced by Simulink.

Pulse Width Block

The plant must be able to convert U from a timed pulse back into a value. The

pulse width block is designed for this, and is the functional inverse of a pulse block. The

block works according to Figure 36.

Figure 36: The Pulse Width Simulink Block

It operates on the principle:

∫ =T

Ttxsigndttxsign0

*))(())(( (3.4)

where it takes T seconds to integrate a ±1 to ±T.

Page 55: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

41

The heart of this block is the re-settable integrator subsystem. The subsystem

encloses an integrator with an enable block. It integrates a positive or negative one-unit

input pulse as long as an input is present and resets to zero when the input is zero. The

output is zero until the pulse is complete, then it switches to a constant value of ±T. A

positive input pulse outputs a constant positive T, and a negative input pulse outputs a

constant negative T. Although there is no such thing as negative time, the block is

capable of it so that the controller and the plant can handle negative or positive feedback.

3.2 Plant Modeling

Numerous strip chart recordings were taken during the actual process to acquire

data for modeling. They were sorted and sectioned into twenty-five clips that best

capture the straightening event. From the chart clips, twenty-five sets of data were

extracted in the following way: Each clip was dissected into three time intervals, or

states, and four TIR readings. This is denoted in Figure 37. The state prior to the event

(straightening) contains the initial rate where the bow increases, from TIR1 to TIR2 over

the interval t1, until the part is straightened. The state during the event contains the bend

rate where the bow decreases, from TIR2 to TIR3 over the interval t2 = BT. The absence

of the sinusoid in this region affirms that the part is not rotating while it is being

straightened. The state after the event contains the resulting rate where the bow either

increases or decreases, from TIR3 to TIR4 over the interval t3.

Page 56: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

42

Figure 37: Dissection of a Strip Chart Clipping

The three rates from each set of data are calculated as follows:

R1 = (TIR2 – TIR1)/ t1 = Y’K-2 (initial rate) (3.5)

R2= (TIR3 – TIR2)/ t2 = Y’K-1 (bend rate) (3.6)

R3= (TIR4 – TIR3)/ t3 = Y’K (resulting rate) (3.7)

The process is event driven because the states (rates) change with the control

signal U, which is a triggered pulse. The rates are sections of Y’. The process is cyclic

because the resulting rate of one event is the initial rate of the next event. Figure 38

contains five-minute plots of each data set from one minute before an event.

Page 57: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

43

States From Actual Data

0.0000

0.0005

0.0010

0.0015

0.0020

0.0025

0.0030

0.0035

0.0040

0 1 2 3 4 5 6

Time (minutes)

|Bo

w| (I

n)

Figure 38: Plot of the Actual Plant Data

Initially, the bend rate (R2) for each data set, n, was assumed to be dependent on

R1 by the following linear combination:

R2n = an*R1n + bn (3.8)

where an and bn were constants to be solved. In order to obtain one set of constants that

satisfies many sets of data, a and b were solved to minimize the following term:

−∑

=

25

0 2

'22min

n n

nn

R

RRabs (3.9)

where

n = the data set number

R2n = the actual bend rate (from Equation 3.6) for data set n

R2’n = a*R1n + b = the calculated bend rate for data set n (3.10)

Page 58: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

44

The results produced a fairly constant R2, comparable to what is seen in Figure 38. This

makes sense because the straightener counter-bends the part a constant distance each

time, producing a constant bend rate, R2. For this reason R2 was chosen as the average

of the actual bend rates:

R2 = -.001 [in./in.] (3.11)

The resulting rate (R3) for each data set was assumed to be dependent on R1 and

t2 (BT). The operator’s intuition was drawn upon in an attempt to choose a linear

combination suitable to represent R3. As a rough guide line:

R3=R1 when BT=0, and R3=R2 when BT=1.5

forming the following equation:

15.1

123 RB

RRR T +

−= (3.12)

that is re-written in polynomial form,

R3 = aR1 + bBT + cR1BT + d

where a= 1.0, b= -.000667, c= -.6667, d= 0. Being unacceptable as rough estimates, a, b,

c, and d were solved to minimize the following term, similar to that in Equation 3.9:

−∑

=

25

0 3

'33min

n n

nn

R

RRabs (3.14)

where

R3n = the actual resulting rate derived from Equation 3.7

R3’n = aR1 + bBT + cR1BT + d, the calculated resulting rate (3.15)

Page 59: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

45

a= .6030719, b= -.0001182, c= 0, and d= 0

The resulting rate is represented by the following equation:

R3n = (.6030719) R1n – (.0001182) BTn (3.16)

Figure 39 shows the data sets plotted using the calculated values for R2 and R3.

States From Calculated Data

0.0000

0.0005

0.0010

0.0015

0.0020

0.0025

0.0030

0.0035

0.0040

0 1 2 3 4 5 6

Time (minutes)

|Bo

w|

(In

)

Figure 39: Plot of the Calculated Plant Data

If R3 was a linear combination of R1, BT, and R2, the results would be the same,

and is shown by the following proof:

If R3 = aR1 + bBT + cR2 + d, (3.17)

And R2 = eR1 + f, (3.18)

Then R3 = (a+ce)R1 + bBT + (cf+d) (3.19)

which has the same form as Equation 3.17 but without the R2 term.

Page 60: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

46

Figure 40: The Plant Simulink Block

The plant model is then constructed in Simulink (Figure 40). The main summing

junction collects rates from four branches at different times, to produce Y’. Branch (1)

produces the initial rate (T0’). It is active until the first bending pulse (U) is received, and

then shuts off for the rest of the simulation. Branch (2) produces R2 (by Equation 3.11)

when U is present. Branch (4) supplies R3 (by Equation 3.16) after each bend. From this

point, the plant toggles between branches (2) and (4), since R3 of one event is R1 of the

next event. At the bottom of Figure 40, two TSH blocks act as a two-state delay to

supply the linear combination block with R1. The pulse width block supplies the linear

combination block with BT by converting the width of U back to BT. Branch (3) supplies

a rate disturbance (TA’) when it is present and U is not.

Page 61: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

47

The rate Y’ is then integrated into the position, P. The initial TIR (T0) sets the

integrator’s initial value. The part roundness is added to P as a baseline with the same

sign to produce Y. Y is modulated by the rotator’s rotation to produce IR.

3.3 Bend Timer and Decision Modeling

The main function of the bend timer block (Figure 41) is to create a BT minute

pulse (U) when the bend pulse, BP, is triggered from the decision block. The pulse block

sets the minimum bend time, BTMIN, and the max bend time block sets BTMAX. The min

bend time block is used to ignore incoming bend pulses that are too small. The pulse1

block is used to create a pulse that is used to ignore incoming bend pulses while the

circuit is timing and lasts until the TIR is finished being sampled.

Figure 41: The Bend Timer Simulink Block

Page 62: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

48

The secondary function of the bend timer block is to create the rate disturbance

(TA’) that supplies the plant, because it is a convenient location.

Figure 42: The Decision Simulink Block

The function of the decision block, shown in Figure 42, is to decide when to

counter-bend the part. The dead zone block allows a positive one-unit BP if |e| > TL, a

control tolerance limit. TL is set for .05, which corresponds to a Y=. 00005”, practically

near zero. Although the decision block triggers a bend practically all the time, this does

not mean that the part is bent. The controller also must produce a BTMIN < BT < BTMAX

for the part to be bent. Along with tuning the controller, TL, BTMIN, and BTMAX are

adjusted for maximum performance.

Page 63: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

49

CHAPTER IV

CONTROL DESIGN

Presently, there are many different control structures available, the simplest of

which is the PID controller design. For this reason, a PD controller is first applied to the

closed loop model to verify its response and stability. It is used as a benchmark for other

controllers. Next, a nonlinear PD (NPD) control scheme is introduced. It retains the

tuning ease of the PD controller while improving performance. Last, a nonlinear filter,

the tracking differentiator (TD), is introduced as an alternate means of providing an

accurate feedback to the controller in the midst of noise, thus improving performance.

Page 64: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

50

4.1 PID Control Design

For many reasons, PID control is still used in 90% of industrial applications [6].

There are only three tuning parameters, each having direct physical significance to the

error signal, not the model. This makes for easy tuning, without having to spend

considerable resources on the construction of a linear model. Oftentimes, linear models

turn out to be inaccurate and require retuning when the real-world plants they represent

are nonlinear and time varying. A control structure that is error-based (and not model-

based) is more resilient to model uncertainties [6]. The operator or a technician can be

taught to tune a PID controller’s three parameters in most situations.

The PID control law represents the direct physical meanings of the three

parameters:

dt

deKedtKeKu DIP ∫ ++= (4.1)

where e is the error signal, KP is the proportional gain, KI is the integral gain, and KD is

the derivative gain. It is apparent that the KP term, in Equation 4.1, is most effective

when the error is the largest. This occurs in the early stages of the transient, and it helps

to initialize the transient. The KD term is most effective when the error is changing the

quickest. This occurs in the transient region, and it helps to prevent overshoot and add

damping [8]. The KI term is most effective when the error is small and changing the

least. This occurs in the steady state region where it continues to drive the steady state

error to zero.

Page 65: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

51

The operator intuitively sets a bend time based on Y and Y’ when manually

controlling the machine. Hence, a PD controller is chosen as a starting point. The closed

loop model utilizing the PD controller is shown in Figure 43.

Figure 43: The Closed Loop Model with a PD Controller

The PD controller was tuned for the smallest possible settling time, overshoot, and steady

state error. The optimized parameters are listed:

KP = 1, KD = 1

This model differs from most continuous time models. The discontinuity (in

time, position, and rate) produced by the bending event permits the position and rate to be

decoupled from each other. The rate is not automatically driven to zero when the

position is, as is the case with many first and second order plants. For example, a first

order plant that is driven to zero with PD feedback control is represented as:

y’ = u – y (4.2)

u = KP e + KD e’ (4.3)

where = the time constant, e = -y, and e’ = -y’. Substituting Equation 4.3 into Equation

4.2 yields the closed loop dynamics:

Page 66: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

52

jy’ = -y where P

D

K

Kj

++=

1

τ, the modified time constant (4.4)

This form expresses how the output position, y, and the rate, y’, are directly related, and

how the rate is driven to zero by the position.

The plant modeled in the previous chapter is represented by the following open

loop equations:

Y’K = aY’K-2 + bu (rate dynamics from Equation 3.16) (4.5)

YK = YK-2 + gu (position dynamics) (4.6)

u = KP e + KD e’ (PD control law) (4.7)

where

a = .6030719 and b = -.0001182 (from Equation 3.16)

YK and Y’K = the current position and rate (R3)

YK-2 and Y’K-2 = the prior position and rate (R1)

e = -fYK-2 and e’ = -fY’K-2

f = 1000 (the feedback gain)

g = Y’K-1 = -.001 = the bend rate (R2)

Closing the loop shows that the current position and rate dynamics are independent of

each other. They are dependent on the prior position and rate by the following equations:

++

=

2

2

K

K

'1182.6031.1182.

1

Y'

Y

K

K

DP

DP

Y

Y

KK

KK (4.8)

Page 67: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

53

4.2 NPID Control Design

Although the PID parameters are easy to tune, they are limited by their linearity

[6]. Each term of Equation 4.1 is discussed separately. The proportional term is

ineffective in minimizing steady state error when the error (e) is small, unless KP is set

very large. This can lead to overshoot and cause the control to saturate when the error is

large. Hence, the KP term has to be inversely proportional to the error in order to have a

consistent effect on the response. Conversely, motion profiles are very effective because

they attempt to keep the error in a small range, a better counterpart to the constant

proportional gain. They are only effective on the initial transient. Consequently, Gao

proposed a nonlinear function that will inversely affect the (nonlinear) error. The

proportional term is replaced by [6,8]:

KP |e|a sign(e), 0<a<1 (4.9)

When 0<a<1, the term is small for large errors (minimizing overshoot and saturation) and

large for small errors (minimizing the steady state error). Equation 4.9 approaches an

infinite gain when the error approaches zero, causing a bang-bang chattering due to

numerical issues [8]. Inserting a linear region in the neighborhood of zero solves the

problem [6]:

KP fal(e,a,d) (4.10)

where

<

>=

− ded

e

deesignedaefal

a

a

||

||),(||),,(

1

, d>0 (4.11)

Page 68: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

54

where fal(e,a,d) is linear when |e| <d. When a>1, the control is detuned. Figure 44 shows

a plot of the fal function for 0<a<1 and for a>1.

Figure 44: The fal Function for 0<a<1 and a>1

Figure 45 illustrates how the function is constructed in Simulink.

Figure 45: The fal Simulink Block

The control law is written to represent a general nonlinear PID (NPID) by the following

[6]:

),,(),,(),,( dadt

defalKdtdaefalKdaefalKu DIP ∫ ++= (4.12)

The derivative term needs only to be effective in the transient region when de/dt is

relatively large. Since the error changes very little in the steady state, the KD term

basically processes noise and degrades the control [6,8]. Setting a>1 will allow the KD

Page 69: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

55

term to be effective when de/dt is high (in the transient region) and inconspicuous when

de/dt is small (in the steady state) [8]. To further minimize the effects of noise, Gao

proposed that a true dead zone be placed on the derivative term, making it only

operational when de/dt is large enough [8]. The derivative term in Equation 4.12 can

again be rewritten as follows:

dad

dt

degfalK ddD ,),,( (4.13)

where

≤>

=d

d

dddx

dxxdxg

||,0

||,),( , dd>0, a>1 (4.14)

The integral term is most effective in the steady state region when the error is

small. Here it ensures that the (otherwise finite) error is driven to zero. Other places in

the response, the integral is prone to saturation and windup. There is also a 90-degree

phase lag associated with the integrator that can push higher-order plants towards

instability [6,8]. Sometimes the use of nonlinear KP and KD terms can eliminate the need

for the KI term altogether. If the term is needed, setting a<1 helps to reduce these risks.

A counterpart of the true dead zone can be placed on the KI term, making it only

operational when the error is small. The integral term in Equation 4.12 can again be

rewritten as follows.

( )∫ dadegfalK iiI ,),,( (4.15)

where

≥<

=i

i

iidx

dxxdxg

||,0

||,),( , di>0, a<1 (4.16)

The following control law summarizes the NPID control design discussed in this section:

Page 70: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

56

( )∫

++= DDddDIIiiIPPP daddt

degfalKdadegfalKdaefalKu ,),,(,),,(),,(

(4.17)

These fundamental concepts were used to quickly design a nonlinear controller.

The next chapter simulates the controllers in the closed loop under various conditions.

The results are tabulated and discussed. The nonlinear controller is pictured in the

simulation loop in Figure 46, and the controller parameters are visible. Although the

plant is unusual, the NPD concepts previously discussed were effective.

Figure 46: The Closed Loop Model with the NPD Controller

4.3 TD Feedback Design

When a controller uses the KD term, the derivative of the error should be obtained

in a noise-free fashion. Typically a pure derivative unacceptably amplifies even the least

bit of noise, rendering it useless [8]. Hence, approximations are used. Though a second

order approximation is sometimes sufficient, it is a frequency dependent filter that has an

effect on the loop gain. This complicates the simplicity of the PID and leads toward loop

shaping methods that are more difficult to tune on the fly. For this, Gao proposed a

Page 71: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

57

nonlinear mechanism, known as the tracking differentiator (TD). Its single parameter, M,

also has a direct physical meaning. It is the upper bound on the acceleration of the

system and the filter is not dependent on the frequency composition of the system [6].

Since x2 is obtained through integration, it is less sensitive to noise. It is based on time

optimal control theory [8].

+−−=

=

M

xxtvxMsignx

xx

2

||)( 22

12

21

&

&

(4.18)

where the states of the observer, x1 and x2, track the input signal, v(t), and its general

derivative respectively. The TD Simulink block, in Figure 47, is shown in the NPD

closed loop configuration in Figure 48.

Figure 47: The TD Simulink Block

Figure 48: The Closed Loop Model with a TD

Page 72: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

58

CHAPTER V

SIMULATION

In this chapter, the PD controller and the NPD controller are simulated in

Simulink on the closed loop model. The significance of practical initial conditions and

disturbances are considered. Simulation results from the two cases are presented and

discussed. Both controllers are sufficient for physical implementation, but the nonlinear

PD controller has better performance and disturbance rejection overall. Last, a second

order approximation and a TD are implemented in the feedback loop and simulated with

heavy feedback noise. The results show that the TD provides a cleaner derivative and

output estimate in the midst on noise, and is easier to tune.

Page 73: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

59

5.1 PD Controller Simulation

The PD closed loop configuration, pictured in Figure 49, uses the PD controller

from Section 4.1.

Figure 49: The PD Closed Loop Configuration

Various initial conditions in the decision, bend timer, and plant blocks are

determined in an effort to produce a practical simulation. All of the initial condition

settings are discussed, and then changed one by one for different simulations. The

decision block incorporates the tolerance limit, TL, which is set to .05. This allows the

bend timer to produce a bend time from the controller throughout the range of motion

until the steady state error is practically zero. Therefore, the bend timer, incorporating

the limits BTMIN and BTMAX, determines when a bend takes place. This occurs if the

controller produces a BTMIN > BT > BTMAX. Experience has shown BTMIN = .1, and

BTMAX = 3 to be practical. The time it takes for the controller to sample the output, YST,

is initially set to .1. The initial conditions for the plant are set as follows:

Y0 = .020” (Initial position)

Y’0 = .001” per inch (Initial Rate)

R2 = -.001” per inch (Bend rate)

Page 74: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

60

RND = 0 (Roundness of the part)

The operator usually attempts to straighten the bar within .001” as fast as

possible. Based on this specification, the settling time, ts, is defined as the time it takes Y

to stabilize under ±.001”. The PD controller parameters were tuned to first achieve

minimum settling time, and then minimum overshoot and steady state error. The

overshoot, OS, is defined as the maximum for t > ts and the steady state error, ess, is

defined as the maximum in the steady state region. With these parameters, the PD

controller is simulated (Figure 50).

Figure 50: The PD Controller Simulation

An out-of-round part is simulated by setting RND = .002” (Figure 51). This is a

typical occurrence. TL is set to 4.05 so the control behaves well within .002” TIR.

Page 75: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

61

Figure 51: PD Simulation of an Out-Of-Round Part

Allowing the control 30 seconds to sample the actual TIR is simulated by setting YST = .5

(Figure 52). The spikes in the Rate signal are the control action. They get wider.

Figure 52: PD Simulation of a 30 Second Y Sample Time

Next, the PD controller is simulated with all combinations of three types of

disturbances. The first type is a rate disturbance, D, that is injected into the plant. It is a

Page 76: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

62

good indication of the controller’s robustness. Adding this disturbance has the same

affect as changing one of the parameters in the plant. It is set inside the band timer as a

.0006” per inch rate that lasts between 40 to 60 minutes of the 100 minutes simulation.

The second type of disturbance is in the form of band-limited white noise that is added to

D. It is set to have a noise power of 1x10-7

and a speed of 233. The third type of

disturbance is in the form of band-limited white noise that is added to the feedback path,

typical to that of sensor noise. It is set to have a noise power of .11 and a speed of 23341.

The configuration is shown in Figure 53. All of the results are tabulated and discussed in

the chapter summary.

Figure 53: PD Disturbance Test Configuration

The rate disturbance (D) is simulated in Figure 54. Here, the control constantly

tries to overcome the rate disturbance. This disturbance is also modeled as the unknown

rate condition of the incoming part. The rate disturbance plus noise (D +DN) is simulated

in Figure 55. When the PLC calculates Y from a noisy sensor output, this disturbance is

carried through the plant model.

Page 77: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

63

Figure 54: PD Rate Disturbance Simulation

Figure 55: PD Rate Disturbance Plus Noise Simulation

The PD controller is tested with feedback noise in Figure 56, and with all three

disturbances in Figure 57.

Page 78: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

64

Figure 56: PD Feedback Noise Simulation

Figure 57: PD Simulation with All Disturbances

Next, the initial position (Y0) is changed from .020” to .003” (Figure 58). This occurs

frequently in the real process and is also a good indication of the robustness of the

controller, since the initial position changes constantly.

Page 79: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

65

Figure 58: PD Simulation with Y0 = .003”

5.2 NPD Controller Simulation

The NPD closed loop configuration, pictured in Figure 59, uses the NPD

controller from Section 4.2.

Figure 59: The NPD Controller Configuration

Page 80: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

66

All of the initial conditions are set identical to those in the previous section. Each

simulation is conducted again, but with the NPD controller. The results are tabulated and

discussed in the chapter summary. The controller is tuned to produce a minimum settling

time when the initial position is set to .020”. It is further tuned for minimum overshoot

and steady state error. The NPD simulation is pictured in Figure 60.

Figure 60: The NPD Controller Simulation

Figure 61: NPD Simulation of an Out-of-Round Part

Page 81: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

67

The control is then tested for its resilience to an out-of-round part condition,

shown in Figure 61, by setting RND to .002” and TL to 4.05. The controller is also tested

against the pure transport delay associated with waiting for the control to sample Y.

Again, YST is set for 30 seconds and simulated in Figure 62. Figure 63 shows the effects

of the rate disturbance that is outlined in the previous section.

Figure 62: NPD Simulation of a 30 Second Y Sample Time

Figure 63: NPD Rate Disturbance Simulation

Page 82: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

68

The closed loop model with the NPD controller is then simulated with all

combinations of the three types of disturbances that were previously discussed. Some of

the simulations are pictured, the same ones that are pictured for the PD controller. Figure

64 shows a dramatic improvement that the NPD controller has with stabilizing the output

during heavy rate disturbances and noise.

Figure 64: NPD Rate Disturbance Plus Noise Simulation

Figure 65: NPD Feedback Noise Simulation

Page 83: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

69

Figure 65 shows a comparable response to that of the PD controller for combating

sensor noise, and Figure 66 illustrates the NPD’s control over all three of disturbance

conditions simultaneously. These conditions are based on the limitations discussed in

Section 1.2 and are likely to occur when the controller is operational on the real machine.

Figure 66: NPD Simulation With All Disturbances

Figure 67: NPD Simulation with Y0 = .003”

Page 84: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

70

5.3 TD Feedback Simulation

In an attempt to find a better way to extract a clean derivative from a noisy

feedback signal, two derivative approximations are simulated in the presence of heavy

feedback noise. As mentioned in Section 4.3, a pure derivative amplifies noise and is

often useless in the real world. A second order approximate derivative is implemented

using the alternate closed loop block diagram from Figure 29 on page 30. It is then tuned

for maximum performance in the midst of the feedback noise, NF. The configuration,

shown in Figure 68, is also simulated with all three disturbances present. For comparison

between controllers, the NPD controller is simulated with NF and all of the disturbances

noted as D+ND+NF (All) in the simulation results.

Figure 68: Second Order Approximate Derivative Configuration

As usual, the nonlinear is tested against the linear. A TD is implemented using

the alternate closed loop block diagram from Figure 29 on page 30. It is then tuned for

maximum performance in the midst of the feedback noise, NF, by its one parameter, M.

Page 85: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

71

This is an easy task because M has direct physical significance to the maximum

acceleration of the system. After the TD, a nonlinear filter (discussed in Equation 4.16

on page 55) that rejects large errors is implemented to further improve performance. The

configuration, shown in Figure 69, is again simulated with all three disturbances present.

For comparison between controllers, the PD controller is simulated with NF and ALL

disturbances present.

Figure 69: Tracking Differentiator Configuration

5.4 Results and Summary

The results of the transient response of the two controllers for two widely

different initial positions are tabulated below. All units are in thousandths except for

settling time.

Page 86: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

72

TABLE I: COMPARISON OF THE TRANSIENT RESPONSE

Controller .020 TIR Initial .003 TIR Initial

Ts OS SS error Ts OS SS error

PD 19.9294 0.083437 0.063952 2.22 0.23481 0.09357

NPD 19.9294 0.316511 0.013544 2.22 0 0.06848

The PD controller exhibited better overshoot than the NDP controller, partially

because it was tuned better. Conversely, the NPD controller outperformed the PD

controller in every other way. When the initial position was changed by a factor of

almost seven, the PD controller’s performance decreased, while the NPD controller’s

overshoot improved. This is due to the nonlinear gains, which make the control more

sensitive to small errors and transients.

Next, the results of the steady state error of each controller for various disturbance

combinations are tabulated below.

TABLE II: COMPARISON UNDER VARIOUS DISTURBANCES

Disturbance Combinations Controller

D Nf D+Nf Nd D+Nd Nd+Nf All

PD 1.34401 1.9158 2.4994 2.4246 2.2591 3.0162 3.0029

NPD 0.37696 1.9201 2.4572 0.0661 0.7115 1.9971 2.3659

The two controllers exhibited similar responses to the feedback noise, which will be

further examined with the use of the derivative approximates in the feedback path. The

nonlinear control largely outperformed its linear counterpart in the way of rate

Page 87: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

73

disturbance and noise. This is a good indication that the nonlinear controller is more

robust on this type of plant. The overall performance is better with the NPD controller.

TABLE III: COMPARISON OF DERIVATIVE APPROXIMATES

Nf Disturbance Present All Disturbances Present Controller

None 2nd Apx. TD None 2nd Apx. TD

PD 1.9158 1.9181 1.7891 3.0029 3.4209 1.8524

NPD 1.9201 2.0518 1.4912 2.3659 2.6412 1.7557

Last, the feedback noise was simulated through the derivative approximates and

the results are tabulated in Table III. Both of the controllers improved performance-wise

with the use of the TD in the feedback path, and degraded with the implementation of the

second order approximate. There are two possible reasons for this occurrence, the first

being that the second order approximate was poorly tuned. The second reason is that the

tracking differentiator is a nonlinear filter that limits the maximum acceleration of the

system and is not a frequency dependent filter. Furthermore, the ease of tuning was one

of the major design goals.

By and large, the nonlinear control methods that were discussed have a

performance advantage over the linear ones, while maintaining the ease of tuning. The

tracking differentiator has a performance advantage over the second order approximation,

and maintains its tunability. The second order approximate derivative is not easily tuned

in some cases.

Page 88: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

74

CHAPTER VI

CONCLUSION

Overall, in this research effort, the basic concepts needed to understand the

industrial process of straightening round metal bars were discussed, along with the

introduction of a specific manually operated straightening machine. A closed loop block

diagram was designed and modeled in Simulink. Then, hardware was designed and used

to take initial data. Details pertaining to the simulation of an event-driven plant with a

continuous time controller were addressed. A few special Simulink blocks were designed

that proved to be very flexible. Next, a nonlinear PID (NPID) control method was

introduced. It retains the tuning ease of the PID controller while improving performance.

Last, a nonlinear filter, the tracking differentiator (TD), was introduced as an alternate

means of providing an accurate feedback to the controller in the midst of noise, which

outperformed its second order counterpart.

Page 89: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

75

6.1 Future Research

Since many of the plant’s physical limitations were considered in the simulation

model, the nonlinear control strategies outlined in this text are viable and ready for

hardware-in-the-loop implementation. Based on the steps taken thus far, the following

areas are recommended for further study:

6. The PLC algorithm that validates the sensor output against a set of rules

can be designed.

7. The mathematical model that determines the resulting rate by a linear

combination of variables can be further studied to find other linear

combinations that produce less error to the raw data.

8. Other nonlinear controllers can be designed and simulated. The active

disturbance rejection talked about by Gao [6,8] can be implemented to

reject model uncertainties by using an extended state observer.

9. The process can be modeled in discrete time and/or with different

software. Writing the entire plant and bend timer in C will drastically

simplify the simulation model. From this, a class of problems can be

clearly studied.

10. The process can be investigated and modeled as a state machine.

11. An alternative nonlinear function can be studied as a replacement to the fal

function outlined in Equation 4.11 on page 53. The function defined as:

Page 90: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

76

)()1(),( || usigneauf ua−−= is continuous and boasts only one design

parameter.

Page 91: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

77

REFERENCES

1. Thomas Brem, “Spindles, Gage Heads Key to Roundness Accuracy,”

http://www.qualitymag.com/articles/1997/oct97/1097f3.html, October 1997.

2. Gary K. Griffith, The Quality Technician’s Handbook, 2nd Ed., pp.208-213, Prentice-Hall, Inc., 1992.

3. “Form Geometry,” allmeasure.com,

http://www.allmeasure.com/Measuring_Devices/Form_Size/Form_Geometry/form_geometry.html,

2001.

4. “Roundness measurement,” National Physics Laboratory,

http://www.npl.co.uk/npl/length/dmet/services/ms_roundness.html, 2001.

5. “Technical Notes,” Panametrics, Inc., http://www.panametrics.com, February 26, 2001.

6. Zhiqiang Gao, Yi Huang, J. Han, “An Alternative Paradigm for Control System Design,” To appear in

the proceedings of IEEE 2001 Conference on Decision and Control.

7. Fangjun Jiang, “A Novel Control Approach to a Class of Antilock Brake Problems,” pp. 29-34, Doctoral

Dissertation, Department of Electrical and Computer Engineering, Cleveland State University, May

2000.

8. Zhiqiang Gao, “From Linear to Nonlinear Control Means: A Practical Progression,” To appear in ISA

Transactions.

Page 92: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

78

APPENDICIES

A. Plant Data

Twenty-five sets of data were extracted from strip chart recordings of the plant.

Each recording was dissected into three time intervals and four TIR readings (Section

3.2). This data was then used to model the plant.

TIR1 TIR2 TIR3 TIR4 T1 T2 T3

0.0026 0.0034 0.0024 0.0026 6 0.6 4

0.002 0.0026 0.0016 0.0016 4 0.5 4

0.0036 0.0052 0.004 0.0032 7 0.7 5

0.0028 0.0066 0.0043 0.0044 8 1 2

0.002 0.0045 0.0032 0.0034 7 0.6 4.5

0.004 0.0074 0.0044 0.0037 12 1.3 3

0.0016 0.003 0.0024 0.0026 10 0.5 3

0.0028 0.0036 0.0026 0.0026 13.5 0.8 4

0.0021 0.0038 0.0024 0.0016 5 0.9 6

0.0014 0.0052 0.0028 0.0021 13.5 1 10

0.0017 0.0028 0.0026 0.0032 7 0.4 10

0.0022 0.0048 0.0026 0.0055 7 1 26

0.0018 0.0034 0.0022 0.0016 9 0.8 5.5

0.0032 0.005 0.0037 0.006 6.5 0.7 10

0.0028 0.0062 0.0036 0.0025 30.5 1 6.5

0.002 0.0058 0.004 0.0054 11 0.8 5.5

0.004 0.0054 0.0038 0.0044 5.5 0.6 13.5

0.0038 0.0044 0.0032 0.0032 13.5 0.5 6

0.0022 0.0054 0.004 0.0036 20 0.5 5.5

0.004 0.005 0.0036 0.0028 5.5 0.5 11

Page 93: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

79

0.0028 0.0046 0.0032 0.004 6 0.6 4.5

0.0026 0.0049 0.0038 0.0042 5 0.7 4

0.0038 0.0058 0.004 0.0048 4 0.7 4

0.004 0.0048 0.0032 0.0045 4 0.7 10.5

0.0026 0.006 0.004 0.004 12 0.8 4

B. Hardware Pictures

The hardware was designed to currently handle data acquisition (pictured), with

the capability to function as the controller through PLC programming in the future. The

front panel houses power switches, the strip chart recorder, calibration controls, and the

ultrasonic gage.

Page 94: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

80

The rear panel houses the PLC and external connections. The encoder connection

is not yet wired to this panel.

Page 95: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

81

A two-tier terminal block was designed with various cross-connections to allow

the entire unit to be single-point wired. This simplifies the wiring diagram significantly

and decreases wiring and troubleshooting time.

C. Hardware Wiring

Hardware mounting is often considered during the wiring design phase. A

blueprint for the front panel is designed for hardware mounting.

Page 96: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

82

The two-tier terminal block is shown with various cross-connections to allow the

entire unit to be single-point wired.

Page 97: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

83

D. PLC Ladder Logic for Data Acquisition

The PLC is programmed to recognize and condition an RS-232 ASCII bit stream

from the ultrasonic unit, convert the signal to a binary coded decimal, then scale and

convert it to analog for the strip chart recorder.

Page 98: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

84

Page 99: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

85

Page 100: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

86

Page 101: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

87

Page 102: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

88

Page 103: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

89

E. Sample Strip Chart Recordings

Numerous strip chart recordings were taken during the actual process to acquire

data for plant modeling. They were sorted and sectioned into twenty-five clips that best

capture the straightening event. Some of the strip chart recording clips are pictured

below.

Page 104: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

90

Page 105: A CLOSED LOOP FEEDBACK METHOD FOR A MANUAL BAR …

91