• No results found

Equation of a straight line is y = mx + b

To find the slope (m), you use the following formula:

In Figure 1, pick two x and y on the line and calculate the slope m1 and write the line equation:

M1= 0.25 hence the equation of the line related to m1 is y = 0.25 x + 25.

After 30 minutes, the temperature is:

y (30) = 0.25 (30) + 25 = 7.5 + 25 = 32.5 ° Celsius

Figure 1

Appendix B

PID (Proportional Integral Circuit)

Figure 1 shows that the PID controller receives a set point request from the

programmer and compares it to a measured feedback (E = SP-PV). In Figure 1, SP can be interpreted as where I want to be and feedback (PV) can be thought of as where I really am. The PID controller looks at the current value of an error E, the integral of the error over a time interval ∫ε and the rate of change of the error Δε to determine how much of a correction to apply. The controller continues to apply the correction until change is seen on the feedback. The corrective action can be adjusted at a fast rate (for instance, the analog feedback on some variable frequency drives is updated every 10 milliseconds).

A good PID Tuning technique will calculate exactly how the three Tuning Parameters (or ‘Tunings’): Kp, Ki & Kd is going to be applied. Adjusting these values will change the way the output is adjusted. Fast or slow or something in the middle.

The job of a PID controller is to eliminate the error (eventually getting to the point where the error = 0 in the whole duration time of the process) – so where I am going be is ideally changed to where I want to be.

How does a PID loop work?

PID is an acronym for the mathematical terms Proportional, Integral, and Derivative.

Proportional means a constant multiple. A number is said to be a proportion to another if there exists a constant n such that y = nx. This n can be positive or negative, greater or less than one. To make the formula more accurate by PID controller standards, proportion is given by KP and the x term is the control loop error ε or y = KP(ε).

The term Integral means the summation of a function over a given interval. In the case of controller PID that is the sum of error over time: y = ∫f (ε) dt.

Finally, Derivative is the rate of change during a given interval. Interpreted by a PID controller:

All three of these PID controller components create output based on measured error of the process being regulated. If a control loop functions properly, any changes in error caused by setpoint changes or process disturbances are quickly eliminated by the

combination of the three factors P, I, and D and then imposing it to output port actuator.

Figure 1 shows a simplified block diagram of the PID process control loop

The proportional, integral, and derivative terms are summed to calculate the output of the PID controller. Defining CV(t) as the controller output, the final form of the PID algorithm is shown in Figure 2

Figure 2

Tuning Parameters

The black magic of PID comes in when the three Tuning Parameters (Kp, Ki & Kd) are adjusted well enough (or right tuning values) to drive the Input towards the Setpoint.

So what are the ‘right’ tuning values to use? There isn't one right answer. The values that work for one application may not work for another, just as the driving style that works for a truck may not work for a race car. With each new application you will need to try Several Tuning values until you find a set that gives you what you want.

Proportional Response

The proportional gain (Kp) determines the ratio of output response to the error signal.

For instance, if the error term has a magnitude of 10, a proportional gain of 5 would produce a proportional response = E × Kp = 10 × 5 = 50. In general, increasing the proportional gain will increase the speed of the control system response. However, if the proportional gain is too large, the PV will begin to oscillate. If Kp is increased further, the oscillations will become larger and the system will become unstable and may even

oscillate out of control.

It appears that if we use a simple analog multiplier circuit to replace it with its

mathematical model shown in Figure 2, it will do the job of multiplying the two error term and the proportional gain signals easily to product the related output signal.

An analog multiplier is an important circuit building block in the field of analog signal processing. Its application can be found in communication, measurement and

instrumentation systems (our case). Figure 3 shows a very simplified and naive version of an analog signal multiplier could be made with op amps.

Figure 3

Integral Response

In the close loop equation shown in Figure 2, the integral component sums the error term over time. The result is that even a small error term will cause the integral component to increase slowly. Actually, this ingredient as matter of fact is the sum of all the

instantaneous values that the signal has been, from the time you started counting until you stop counting. The integral response will continually increase over time unless the error is zero, so the effect is to drive the Steady-State error (the final difference between PV and SP) to zero.

From our high school math, we might remember that we can use 3 methods of numerical integration – the rectangular rule, trapezoidal rule, and Simpson's rule. These methods are used to approximate a definite integral.

Figure 4 shows a very simplified and naive version of an analog signal integrator circuit which could be made with op amps. The input voltage passes a current Vi/R1 through the resistor and series capacitor, which charges or discharges the capacitor over time. Because the resistor and capacitor are connected to a virtual ground, the input

current does not vary with capacitor charge and a linear integration operation is achieved.

Figure 4

Rectangular Rule

The rectangular rule for a numerical integration is a relatively crude method for approximating the definite integral. This method approximates f(x) with a piecewise constant function (see Figure 5). The area under the curve y = f(x) is approximated by summing the area of n equally spaced rectangles, called subintervals. The width of each subinterval is abbreviated h, where:

h = (xH-xL)/n

The height of each rectangle is given by f(xi), where xi = xL + (i + 1/2)h.

Given the width and height of each rectangle, the total area under the curve is approximated by summing the area of each rectangle,

This approximation can be significantly improved by approximating f(x) with piecewise linear or quadratic function.

Figure 5

Trapezoidal Rule

This method is similar to the rectangular rule mentioned earlier with one important exception that the function f(x) is approximated by a piecewise linear function, instead of a piecewise constant function. Figure 6 shows the geometric interpretation of the

trapezoidal rule.

Figure 6

As shown in Figure 6, the area A (see Figure 7), where A is divided into n equally spaced subintervals of width h, where h = (xL-xH)/2 and xi = a + hi.

By recognizing that each subinterval consists of a rectangle and a right triangle, Ai=1/2 h [f(xi-1) + f(xi)] where Ai is the area of the ith subinterval. The sum of he area of these n subintervals, A, is

The equation shown in Figure 7 is called the trapezoidal rule.

Figure 7

We next take up the application of integrals to an electrical problem. Later in the continuation of this, we shall see how differentiation would help us to analyze the

operation of certain electrical and magnetic systems. Here, we learn similar application of integrals.

Example 1: Finding energy from power.

We know that the power in a system equals the rate at which energy (work) is expended:

Example 2

The power in a certain electrical system changed according to p = t2 Watts.

Calculate the energy in this circuit used from t =0 to t = 5 by applying the energy equation derived in example 1.

To illustrate the trapezoidal rule, the area under the curve will be approximated by dividing it into five subintervals. Next table shows the results of these calculations.

The sum of the areas of the subintervals is 42.5. By performing the integration it is found that:

Conclusion:

In the close loop equation shown in Figure 2, the integral component sums the error term over time. The result is: even a small error term will cause the integral component to increase slowly. Therefore, this ingredient actually is the sum of all the instantaneous values that the signal has been, from the time you started counting until you stop counting.

The integral response will continually increase over time unless the error is zero, so the effect is to drive the Steady-State error (the final difference between PV and SP) to zero.

Derivative Response

The derivative component causes the output to decrease if the process variable is increasing rapidly. The derivative response is proportional to the rate of change of the process variable. Increasing the derivative time (Td) parameter will cause the control system to react more strongly to changes in the error term and will increase the speed of the overall control system response.

Figure 8 below shows an ideal op-amp integrator with input-output relationships that is theoretically correct.

Figure 8

In high school math, we were told: the exact rate of change of a function y with respect to an independent variable x is the limit that the average rate of change approaches, as approaches zero, while always including the single value of x in question. We will call this exact rate the derivative of y with respect to x (symbol, dy/dx).

There are two ways of introducing the derivative concept, the slope of a curve or a rate of change. The slope of a curve translates to the rate of change when looking at real life

applications (take a look at example 3). Either way, both the slope and the instantaneous rate of change are equivalent, and the function to find both of these at any point is called the derivative.

The Geometrical concept of the Derivative

A way to find the slope is using the rise over run method, or the equation of a straight line is y = mx + b. To find the slope (m), use the following formula:

Figure 9

The way to get a better approximated slope is to make the two x values as possible.

This is a tedious process when we want to find the slope for many points on a graph. So how can we find the slope at a point? This is where differentiation comes in. The

definition of a derivative comes from taking the limit of the slope formula as the two points on a function get closer and closer together.

The physical way or rate of change concept of the Derivative

On the other hand, in Figure 10, we would like to calculate the rate of change or slope of at the point shown.

Figure 10

Instantaneous induced voltage

We do know that if we insert a winding into a magnetic field (or if we withdraw the winding from the field) we change the number of magnetic lines of force through the winding. The law of Henry and Faraday tells us that the result is an average induced

winding voltage Vav. In the formula shown in Figure 11, N is the number of turns and is the flux (in webers) that actually passes through the winding. The induced voltage V (ind) appears in the winding.

Figure 11

The induced voltage at any instant equals the product of the number of turns N times the rate of charge d /dt of the flux that links the winding.

Figure 12

We can express this result in an equation:

Figure 13

The negative sign in equation in Figure 13 accords with Lenz's law, indicating that if a current results from the induced voltage, such a current opposes the flux change.

Example 3

During certain time interval, the magnetic flux through a 100-turn winding varied according to the formula = 10t3 + 5 webers.

We need to find the induced voltage in the winding when t= 0.1 second.

By differentiating = 10t3 + 5, we get d /dt = 30 t2 webers/seconds and by substituting it in the formula shown in Figure 11, we will have:

V (ind) = -N (d /dt) = (-100) [(30) (0.1)2] = -30 volts (at t=0.1)

Related documents