Specific Techniques in Data Acquisition


AMAZON multi-meters discounts AMAZON oscilloscope discounts


K.1 Open and closed loop control

By definition, a data acquisition and control system is not only required to acquire data from a system or process, but also to act on it. In an industrial environment the methods and techniques used to calculate and perform the appropriate actions at any given time, are often extremely critical. Large or incorrect control actions can adversely affect the performance of the system, and can indeed prove to be extremely costly. One well used method of controlling a system or process, in which the current state of the system is fed back to the controller (i.e. the PC), is closed loop control. This method, and the use of a PID control algorithm to implement it, are discussed in the following section.


AMAZON multi-meters discounts AMAZON oscilloscope discounts


K.1.1 Definitions

Control systems are classified as open loop or closed loop systems. The distinction is determined by the control action, which is the mechanism responsible for activating the system to produce the output. An open loop control system is one in which the control action is independent of the output. In this type of control system, there is no feedback from the process on the results of a given control action taking place.


AMAZON multi-meters discounts AMAZON oscilloscope discounts


Two important features of open loop control are:

• Their ability to perform accurately is determined by their inherent accuracy and their calibration. Calibration is the re-establishing of an input-output relationship, to obtain the desired system accuracy.

• They are not generally troubled with problems of instability.

A closed loop control system is one in which the control action is dependent on the output. In this type of control system there is continuous feedback from the process on the results of a given control action taking place.

The most important features of a closed loop control system are:

• Increased accuracy.

• The sensitivity of the output/input relationship (transfer characteristic) to variations in system characteristics being reduced.

• Reduced effects of non-linearities.

• Increased bandwidth.

• Tendency towards oscillation and instability.

K.1.2 Fluid level closed loop control system

Consider the simple closed loop control system shown in Figure K.1, in which the fluid in a tank is being used for an industrial process. The process requires that the fluid in the tank must be maintained at a certain level.


Figure K.1

Fluid level closed loop control system

The required fluid level is called the reference, or SetPoint, and is the input {s(t)} to the system. Depending on the fluid level requirements, the SetPoint may vary with time. The actual fluid level is the output of this system {l(t)} and will vary in time according to the use of water in the tank.

The input to the controller is the error difference {e(t)} between the required level

{ s(t)} and the output level {l(t)}.

The output of the controller {m(t)} sets the valve of the actuator to supply more or less fluid flow to the tank, depending on the level of water in the tank.

If the level of the tank is lower than the SetPoint, the value of the error difference is positive. A positive signal is sent to the valve to open up and allow more fluid to flow into the tank. Conversely, if the fluid level in the tank is greater than the SetPoint, the value of the error difference is negative. A negative signal is sent to the valve to close up and restrict the flow of fluid into the tank.

Where the output is subtracted from the reference input, the system is known as having negative feedback.

K.1.3 PID control algorithms

The closed loop control process, described above, can be represented by the block diagram shown below in Figure K.2.


Figure K.2

Block diagram of a closed loop control system

One effective method of calculating the required controller output m(t) for a given control process, is the PID (proportional, integral and derivative) control algorithm, which is the sum of four terms. This is shown in the following two equations for both the real time continuous and discrete time processes:

WHERE:

m(t) is the output

Kp is the proportional gain constant (l/sec)

Ki is the integral gain constant (l/sec)

Kd is the derivative gain constant (sec) e(t) is (SP-PV) [set point - process variable]

'Bias' is a constant determined from knowledge of the system

WHERE:

m(i) is the output at time of the ith sample (=i*T)

Kp is the proportional gain constant

Ki is the integral gain constant (1/sec)

KD is the derivative gain constant (sec)

T is the time interval for sampling

i is the number of samples e(i) is the error at ith sampling interval e(i-1) is the error at (i-1)th previous sampling interval

Bias is the feed-forward or constant-bias e(i) is the SetPoint (i) - process variable (i) (measured at the ith sample) The first term (proportional term) of these equations is directly proportional to the current process error. The value of the proportional constant (Kp) determines how hard the system reacts to differences between the SetPoint and the actual process variable.

Simple proportional control can't take into account load changes in the process under control. This is handled by the integral term of the PID equation, which sums up the long- term error (m) in the system and adds a correctional value to the controller output, proportional to the integral constant (Ki).

The rate of change of the process error is compensated for by the derivative term. This results in a much faster process response. The derivative term results in a much harder control response, when the error term is going in the wrong direction and a dampening effect when the error term is going in the right direction.

This can be described in another way. If the error term is getting larger, the derivative term will contribute a positive correction to the output; the size of the correction being proportional to the speed at which the error term is getting larger. Conversely, when the error term is getting smaller, the derivative term is negative. If the rate at which the derivative term is getting smaller is too quick, the output from the controller will be reduced, thereby dampening the output.

The bias term is quite simply the value of the controller output that is required to maintain the output at the SetPoint reference.

K.1.4 Transient performance - step response

The response of a closed loop system to a step change in the input reference is known as the step response of the system. This is illustrated in Figure K.3. The step response provides an insight into the transient response of the system, in particular its speed of response and relative stability.

The overshoot is the maximum difference between the transient and steady state responses of the control system. it's a measure of the relative stability.

The rise time is defined as the time required for the output response to a unit-step function input to rise from 10% to 90% of its final value.

The settling time is defined as the time required for the response to a unit-step input to reach and remain within a specified percentage of its final value (steady state value).

The values of rise time and settling time indicate the speed of response of the control system.


Figure K.3 Step response of a closed loop system

The values of Kp, Ki and Kd affect the characteristics of the step response. This is shown in Figure K.4.


Figure K.4 Effect of damping on the step response of a closed loop system

K.1.5 Deadband

The natural tendency of closed loop systems to oscillate around the required output value can be seen from the step response. In addition to this, there are many practical control systems in which it's almost impossible to entirely eliminate the error.

Such systems allow for a zero crossing deadband. This adjustable deadband allows the user to select an error range above and below the SetPoint where the output will not change.

This deadband is useful in ensuring that the output does not oscillate even though there is a small error in the system.

K.1.6 Output limiting

A feature many controllers incorporate, is output limiting (using an anti-reset windup), whereby the software acts to limit the output from the PID equation from exceeding a certain value.

In terms of the PID control algorithm, the integral term is excluded from further calculations until the output returns to a value within the correct operating range.

K.1.7 Manual control - bumpless transfer

Where a control system allows for manual user control of the output, a return to automatic control could cause a 'bump' in the controller output, and subsequently in the system output. Bumpless transfer allows the system to transfer from the manual mode to the automatic mode (where the PID equation determines the output), without the output bumping up or down. This is achieved in software by calculating a required integral term in the PID equation for automatic mode, so that no immediate 'bump' is caused to the output of the controller. The system then slowly adjusts back to the reference output under automatic control.

K.2 Capturing high speed transient data

Transient signals are by their nature very fast. In the frequency domain, a transient pulse contains many high frequency components - the narrower the pulse, the wider the range of frequencies over which the pulse can be represented. Theoretically, an infinite impulse is represented by all frequencies across the frequency spectrum. Intuitively, it's obvious that the narrower the pulse, the higher the rate at which it must be sampled to be accurately represented. The following sections discuss the special data acquisition hardware requirements for capturing high-speed transient data as well as the special triggering techniques used.

K.2.1 A/D board operation and memory requirements

Consider a system, with a sampling rate of 10 MHz (i.e. a sampling period of 100ns), producing 10 million samples/second. Apart from the speed limitations that could prevent the storage of such data to the computer's memory, there is the obvious question of the amount of data being stored, especially when the transient pulse to be captured may only be of 5 µs duration.

Therefore high-speed data acquisition systems used to capture transient data, consist of an A/D converter followed by fast digital memory, which stores the sampled values sequentially, in a circular buffer. A circular buffer is used so that no matter how long it takes to get a trigger event, the system never stops converting the incoming signal. If a trigger event never happens, the A/D system should keep on storing data in the buffer indefinitely; continually overwriting the old data with the new.

When a trigger occurs, the circular buffer information can be saved, thus capturing the latest 'n' seconds of data for display, analysis or permanent storage in the computer's memory. The amount of memory required is determined by the speed of the fastest transient that will be recorded (affects the sampling rate) and the amount of samples before and after a triggerable event that needs to be stored.

K.2.2 Trigger modes (pre- and post-triggering)

Old style oscilloscopes only allowed the viewing of a transient event, after the trigger event (i.e. post-triggered). In high-speed A/D systems, where data is continuously acquired and stored in a circular buffer, it's possible to capture and view what happened before a transient event. This is known as pre-triggering.

Depending on the equipment being used several trigger modes are usually available:

• Post-trigger - collect N samples following the trigger.

• Pre-trigger - collects data into the circular buffer, terminating in the trigger.

• Pre/post trigger - collects data into the buffer and N additional samples following trigger.

• Delay trigger mode - collects N samples a certain delay after the trigger

K.2.3 Trigger source and level

A number of trigger sources and programmable trigger levels are available on high-speed boards for triggering the acquisition.

Analog trigger mode

An analog trigger on a single channel of the board or from an external analog trigger source starts the acquisition.

The threshold level and slope at which the trigger begins the acquisition is commonly programmable. A high resolution DAC output generates the programmed voltage threshold, which is then compared to the analog voltage level from the trigger input.

When the two voltage levels are equal and the slope polarity of the trigger is correct, the acquisition begins.

Where a trigger capability is specified as above or below level, only the value of the analog input trigger and its level with regard to a programmable threshold, is considered.

The trigger slope is ignored.

Digital trigger mode

An external digital trigger input, TTL compatible and programmable as active on the rising or falling edge, triggers the acquisition process. When using the digital trigger mode, some boards specify a minimum pulse width - be wary of this!

Software trigger mode

The data acquisition process is started by a call from software.

Multiple trigger mode

Some boards have dual-trigger capability, which allows triggering to occur on a combination of trigger inputs. The data acquisition will not occur unless both trigger inputs reach their programmed threshold levels.

Logic analyzers and digital storage oscilloscopes, which allow multi-event, multi-level or sequential trigger modes, are examples of equipment that require more complex triggering capabilities.

NEXT:

PREV:

All related articles   Top of Page   Home



Updated: Monday, March 17, 2014 4:39 PST