## PI Controller – Proportional Integral – Control System

Steady-state error can be improved by placing an open-loop pole at the origin,
because this increases the system type by one
. For example, a Type 0 system
responding to a step input with a finite error, will responds with zero error if the system
type is increased by one. But, we want to do this without affecting the transient response.

However, if we add a pole at the origin to increase the system type, the angular contribution of the open-loop poles at hypothetical point A is no longer 180, and the root locus no longer goes through point A, as shown in Figure 1.a and 1.b:

Figure 1.

To solve the problem, we also add a zero close to the pole at the origin, as shown
in Figure 2:

Figure 2.

Now the angular contribution of the compensator zero and compensator pole cancel out, point A is still on the root locus, and the system type has been increased. That is how we can improve the steady-state error without affecting the transient response.

A compensator with a pole at the origin and a zero close to the pole is called an ideal integral compensator, or Proportional-plus-Integral PI compensator, which transfer function Gc(s)  is:

Next example allows to find how PI compensation works.

For control system of Figure 3, it is required to reduce steady-state error to zero, through a PI controller, keeping damping at ξ=0.173. The plant transfer function is G(s) and its original controller is represented by the gain k:

Figure 3.

The first step is to evaluate the system before the compensation, then to find the location of the two closed-loop second-order dominant poles  in order to get the damping requiered by the design specifications.

Figure 4 shows the Root-Locus of the system before compensation:

>> sgrid(z,0)
>> s=tf(‘s’);
>> G=1/((s+1)*(s+2)*(s+10));
>> rlocus(G);

Figure 4.

Using the damping line in Matlab, we can find the intersection point between the root-locus and the value ξ=0.173as we can see in Figure 5:

>> z=0.173;
>> sgrid(z,0)

Figure 5.

The intersection of Figure 5 shows us that adjusting the gain to k=165 of the original controller, we obtain the damping requiered: ξ=0.173. We also see in Figure 5 that the closed-loop second-order dominant poles s1 and s2, before compensation are:

Now we look for the third pole in the root locus. In Figure 6 we must set the same gain k=165 at the third pole line, in consequence s3 is located at:

Figure 6.

With k=165 we calculate the steady-state error e1(∞) for a step input, before compensation:

Where kp1 the position constant before compensation:

Where kG(s) is the system forward transfer function multiplied by the adjusted gain, before compensation, as in Figure 3. Therefore:

We add a PI controller in cascade into the system, as in Figure 7:

Figure 7.

Here, we have matched the gain constant of the compensator with the original gain constant, that is to say k=ki. The constant a is determined by the location of compensator zero, wich must be near the compensator pole. That is why we set the compensator zero at s=-0.1 , that is to say  a=0.1. The root locus of this compensated system is in Figure 8:

>> G=(s+0.1)/(s*(s+1)*(s+2)*(s+10));
>> rlocus(G);

Figure 8.

In view of the fact that we want to maintain the transient response as unchanged as possible, in Figure 9 we draw the damping line in the root locus and search for the point of intersection between the lines of the root locus and ξ=0.173:

>> z=0.173;
>> sgrid(z,0);

Figure 9.

Adjusting the gain to k=159 in Figure 9, we obtain the damping ξ=0.173. We see that closed-loop second-order dominant poles s1 and s2, after compensation, are:

Looking for the third pole in the root locus,  we must set the gain k=159 at the third pole line. After that, s3 is located at:

These results show that approximately the values ​​of the 3 poles before and after the PI compensation have been conserved, indicating a similar transient response after correcting the error in steady state from 0.108 to 0, as shwon later.

The forward transfer function G2(s)  of the system after compensation is:

One more time, we calculate steady-state error e2(∞) for a step input, after compensation:

In consequence:

Figure 10 compares the step response of the closed-loop system  before and after compensatio PI:

>> G1=165/((s+1)*(s+2)*(s+10));
>> sys_antes=feedback(G1,1);
>> G2=(159*(s+0.1))/(s*(s+1)*(s+2)*(s+10));
>> sys_despues=feedback(G2,1);
>> step(G1,G2)

Figure 10.

Figure 10 shows that through PI compensation we have managed to improve the steady-state error without considerably modifying the transient response of the original system.

`Compensación en Cascada - Lag Compensation`

In construction…

Source :

Written by Prof. Larry Francis Obando – Technical Specialist – Educational Content Writer

Copywriting, Content Marketing, Tesis, Monografías, Paper Académicos, White Papers (Español – Inglés)

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, UCV CCs

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, USB Valle de Sartenejas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contact: Caracas, Quito, Guayaquil, Cuenca. telf – 0998524011

WhatsApp: +593998524011   +593981478463

Anuncios

## Design via Root Locus – Improving Steady-state error via Cascade Compensation

We discuss two ways to improve the steady-state error of a feedback control system using cascade compensation. One objective of this design is to improve the steady-state error without appreciably affecting the transient response.

`Improving Transient Response - Compensation`

We have seen before that setting the gain at a particular value on the root locus yields the transient response dictated by the poles at that point on the root locus. Thus, we are limited to those responses that exist along the root locus. (See Sketching Root Locus with Matlab – Control Systems)

Unfortunately, most of the time the overshoot specification for designing control systems exceed the posibilities of the current root locus. What can we do then?

Rather than change the existing system, we augment, or compensate, the system with additional poles and zeros, so that the compensated system has a root locus that goes through the desired pole location for some value of gain. One of the advantages of compensating a system in this way is that additional poles and zeros can be added at the low-power end of the system before the plant. We should evaluate the transient response through simulation after the design is complete to be sure the requirements have been met.

There are two configurations of compensation mostly used in control systems design: cascade compensation and feedback compensation. These methods are modeled in Figure 1 and Figure 2:

With cascade compensation, the compensating network, G1(s), is placed at the low-power end of the forward path in cascade with the plant, Figure 1.

With feedback compensation, the compensator, H1(s), is placed in the feedback path, Figure 2.

Both methods change the open-loop poles and zeros, thereby creating a new root locus that goes through the desired closed-loop pole location.

`Cascade Compensation - PI Controller`

Steady-state error can be improved by placing an open-loop pole at the origin,
because this increases the system type by one. For example, a Type 0 system
responding to a step input with a finite error, will responds with zero error if the system
type is increased by one. But, we want to do this without affecting the transient response.

However, if we add a pole at the origin to increase the system type, the angular contribution of the open-loop poles at hypothetical point A is no longer 180, and the root locus no longer goes through point A, as shown in Figure 3.a and 3.b:

Figure 3.

To solve the problem, we also add a zero close to the pole at the origin, as shown
in Figure 4:

Figure 4.

Now the angular contribution of the compensator zero and compensator pole cancel out, point A is still on the root locus, and the system type has been increased. That is how we can improve the steady-state error without affecting the transient response.

A compensator with a pole at the origin and a zero close to the pole is called an ideal integral compensator, or Proportional-plus-Integral PI compensator, which transfer function Gc(s)  is:

Next example allows to find how PI compensation works.

For control system of Figure 5, it is required to reduce steady-state error to zero, through a PI controller, keeping damping at ξ=0.173. The plant transfer function is G(s) and its original controller is represented by the gain k:

Figure 5.

The first step is to evaluate the system before the compensation, then to find the location of the two closed-loop second-order dominant poles  in order to get the damping requiered by the design specifications.

Figure 6 shows the Root-Locus of the system before compensation:

>> sgrid(z,0)
>> s=tf(‘s’);
>> G=1/((s+1)*(s+2)*(s+10));
>> rlocus(G);

Figure 6.

Using the damping line in Matlab, we can find the intersection point between the root-locus and the value ξ=0.173as we can see in Figure 7:

>> z=0.173;
>> sgrid(z,0)

Figure 7.

The intersection of Figure 7 shows us that adjusting the gain to k=165 of the original controller, we obtain the damping requiered: ξ=0.173. We also see in Figure 7 that the closed-loop second-order dominant poles s1 and s2, before compensation are:

Now we look for the third pole in the root locus. In Figure 8 we must set the same gain k=165 at the third pole line, in consequence s3 is located at:

Figure 8.

With k=165 we calculate the steady-state error e1(∞) for a step input, before compensation:

Where kp1 the position constant before compensation:

Where kG(s) is the system forward transfer function multiplied by the adjusted gain, before compensation, as in Figure 5. Therefore:

We add a PI controller in cascade into the system, as in Figure 9:

Figure 9.

Here, we have matched the gain constant of the compensator with the original gain constant, that is to say k=ki. The constant a is determined by the location of compensator zero, wich must be near the compensator pole. That is why we set the compensator zero at s=-0.1 , that is to say  a=0.1. The root locus of this compensated system is in Figure 10:

>> G=(s+0.1)/(s*(s+1)*(s+2)*(s+10));
>> rlocus(G);

Figure 10.

In view of the fact that we want to maintain the transient response as unchanged as possible, in Figure 11 we draw the damping line in the root locus and search for the point of intersection between the lines of the root locus and ξ=0.173:

>> z=0.173;
>> sgrid(z,0);

Figure 11.

Adjusting the gain to k=159 in Figure 11, we obtain the damping ξ=0.173. We see that closed-loop second-order dominant poles s1 and s2, after compensation, are:

Looking for the third pole in the root locus,  we must set the gain k=159 at the third pole line. After that, s3 is located at:

These results show that approximately the values ​​of the 3 poles before and after the PI compensation have been conserved, indicating a similar transient response after correcting the error in steady state from 0.108 to 0, as shwon later.

The forward transfer function G2(s)  of the system after compensation is:

One more time, we calculate steady-state error e2(∞) for a step input, after compensation:

In consequence:

Figure 12 compares the step response of the closed-loop system  before and after compensatio PI:

>> G1=165/((s+1)*(s+2)*(s+10));
>> sys_antes=feedback(G1,1);
>> G2=(159*(s+0.1))/(s*(s+1)*(s+2)*(s+10));
>> sys_despues=feedback(G2,1);
>> step(G1,G2)

Figure 12.

Figure 12 shows that through PI compensation we have managed to improve the steady-state error without considerably modifying the transient response of the original system.

`Compensación en Cascada - Lag Compensation`

In construction…

Source :

Written by Prof. Larry Francis Obando – Technical Specialist – Educational Content Writer

Copywriting, Content Marketing, Tesis, Monografías, Paper Académicos, White Papers (Español – Inglés)

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, UCV CCs

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, USB Valle de Sartenejas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contact: Caracas, Quito, Guayaquil, Cuenca. telf – 0998524011

WhatsApp: +593998524011   +593981478463

## Design a PD compensator to yield a 16% overshoot – Control system

Given the system of Figure 1, design a PD compensator to yield a 16% overshoot, with a threefold reduction in settling time (one-third of the uncompensated system’s settling time).

Figure 1

Let us first evaluate the performance of the uncompensated system. The root locus for the uncompensated system is shown in Figure 2:

>> s=tf(‘s’);
>> G=1/(s*(s+4)*(s+6));

Figure 2

Since 16% overshoot is equivalent to ξ=0.504, we search along that damping ratio line in Figure 3:

>> z=0.504;
>> sgrid(z,0);

Figure 3

According to Figure 3, adjusting the gain to k=43.4 we get ξ=0.504 and a natural frequency ω=2.39 rad/s.

Based upon a second-order approximation, we can use the 2% criteria and calculate the settling-time Ts1 before the compensation, as a function of the naural frequency ω  and the damping ξ, by means of the following equation:

Simulation of Figure 3 generates the necessary values for equation (1), so that:

In the other hand, the value of the factor ω*ξ =1.2045 matches the real part σ  of closed-loop second-order dominant poles, as we can see in Figure 3 or by the following command in Matlab, taking into consideration that the straight-forward transfer function is now G1:

>> G1=43.4/(s*(s+4)*(s+6));
>> sys_antes=feedback(G1,1)

>> damp(sys_antes)

The desig requirements ask for an 16% overshoot and a reduction of the settling-time of 1/3 after compensation. So, the settling-time Ts2 after compensation is:

Using equation (1) we can know the value of the factor ω*ξ  after compensation:

That is to say, the real part of second-order dominant poles after compensation is σ=3.6137. To find the imaginary part wd we use the root-locus of  Figure 4:

Figure 4.

Consequently, after compensation the second-order dominant poles must be located at   p=-3.6137+j6.1940.

Now, to evaluate the whole system we will use point p as a test point.

PD compensation consists of a cascaded controller with a Gc(s) transfer funcion that is:

The configuration of such a controller is:

Figure 5.

Next step is to design the location of Zero zc using the test point and finding the equivalent values for k1 and k2.

The result is the sum of the angles to the design point of all the poles and zeros of the compensated system except for those of the compensator zero itself. The difference between the result obtained and 180 is the angular contribution required of the compensator zc es:

The geometry is shown in Figura 6, where we can get the real part of zc by means of the following formula:

Figure 6.

From where:

Now, we study the root-locus of Figure 7, where the forward-path transfer function is G2:

>> G2=(s+3.006)/(s*(s+4)*(s+6));
>> rlocus(G2)

Figure 7.

According to Figure 8, adjusting the gain k=47.4 we keep ξ=0.504, an overshoot 16%,  the second-order dominant pole s=-3.6137+j6.1940, at a natural frequency ω=7.17 rad/s.

>> z=0.504;
>> sgrid(z,0);

Figure 8.

With this new data, we evaluate the settling-time Ts2 after compensation:

It shows that we have achieved the design goal. Figure 9 compares the response of the closed-loop system to an step input before and after  PD compensation:

>> G=43.4/(s*(s+4)*(s+6));
>> G3=(47.4*(s+3.006))/(s*(s+4)*(s+6));
>> sys_before=feedback(G,1);
>> sys_after=feedback(G3,1);
>> step(sys_before,sys_after)

Figure 9.

The response of Figure 9 shows a considerable improvement in the settling-time and, in general, the compensation allows a faster system with an overshoot that does not vary much. Before compensation,  Ts=3.4712 s. After compensation, Ts=1.1527 s.

`An alternative design process in Matlab`

Use MATLAB, the Control System Toobox, and the following steps to use SISOTOOL to perform the design of last Example.

1. Type sisotool in the MATLAB Command Window.
2. Select Import in the File menu of the SISO Design for SISO Design Task Window.
3. In the Data field for G, type zpk([],[0,-4,-6],1) and hit ENTER on the keyboard. Click OK.
4. On the Edit menu choose SISO Tool Preferences . . . and select Zero/pole/gain: under the Options tab. Click OK.
5. Right-click on the root locus white space and choose Design Requirements/New . . .
6. Choose Percent overshoot and type in 16. Click OK.
7. Right-click on the root locus white space and choose Design Requirements/New . . .
8. Choose Settling time and click OK.
9. Drag the settling time vertical line to the intersection of the root locus and 16%
10. Read the settling time at the bottom of the window.
11. Drag the settling time vertical line to a settling time that is 1/3 of the value
found in Step 9.
12. Click on a red zero icon in the menu bar. Place the zero on the root locus real axis by clicking again on the real axis.
13. Left-click on the real-axis zero and drag it along the real axis until the root locus intersects the settling time and percent overshoot lines.
14. Drag a red square along the root locus until it is at the intersection of the root locus,
settling time line, and the percent overshoot line.
15. Click the Compensator Editor tab of the Control and Estimation Tools Manager window to see the resulting compensator, including the gain.

Source:

Written by: Larry Francis Obando – Technical Specialist – Educational Content Writer.

Mentoring Académico / Empresarial / Emprendedores

Copywriting, Content Marketing, Tesis, Monografías, Paper Académicos, White Papers (Español – Inglés)

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, Caracas.

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, Valle de Sartenejas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contact: Caracas, Quito, Guayaquil, Cuenca – Telf. 00593998524011

WhatsApp: +593998524011    /    +593981478463

## Design via Root Locus – Improving Transient Response via Cascade compensation

In this article, we discuss the PD controller and Lead Compensation, two ways to improve the transient response of a feedback control system by using cascade compensation. Typically, the objective is to design a response that has a desirable percent overshoot and a shorter settling time than the uncompensated system.

`Improving Transient Response - Compensation`

We have seen before that setting the gain at a particular value on the root locus yields the transient response dictated by the poles at that point on the root locus. Thus, we are limited to those responses that exist along the root locus. (See Sketching Root Locus with Matlab – Control Systems)

Unfortunately, most of the time the overshoot specification for designing control systems exceed the posibilities of the current root locus. What can we do then?

Rather than change the existing system, we augment, or compensate, the system with additional poles and zeros, so that the compensated system has a root locus that goes through the desired pole location for some value of gain. One of the advantages of compensating a system in this way is that additional poles and zeros can be added at the low-power end of the system before the plant. We should evaluate the transient response through simulation after the design is complete to be sure the requirements have been met.

There are two configurations of compensation mostly used in control systems design: cascade compensation and feedback compensation. These methods are modeled in Figure 1 and Figure 2:

With cascade compensation, the compensating network, G1(s), is placed at the low-power end of the forward path in cascade with the plant, Figure 1.

With feedback compensation, the compensator, H1(s), is placed in the feedback path, Figure 2.

Both methods change the open-loop poles and zeros, thereby creating a new root locus that goes through the desired closed-loop pole location.

`Cascade Compensation - PD controller`

As we said before, sometimes poles and zeros must be added in the forward path to produce a new open-loop function whose root locus goes through the design point on the s-plane, in order to meet design requirements. One way to speed up the original system that generally works is to add a single zero to the forward path.

This zero can be represented by a cascade compensator whose transfer function Gc(s) is:

This function, the sum of a differentiator s and a pure gain Zc, is called an ideal derivative compensation, or Proportional-Derivative PD controller. In summary, transient responses unattainable by a simple gain adjustment (proportional controller) can be obtained by augmenting the system’s zeros with an ideal derivative controller.

Let´s use the Root Locus of Figure 3 to find out how a PD controller works. There, we have the Root Locus of a control system which forward transfer function G(s) with unitary feedback is:

If K=1, the commands in Matlab would be:

>> s=tf(‘s’);
>> G=1/((s+1)*(s+2)*(s+5));
>> rlocus(G);

Suppose that we want to operate the system of Figure 3 with a damping ratio ξ=0.4. Figure 4 shows that we can get this damping ratio with a proportional compensator, setting the gain K=23.7:

>> z=0.4;
>> sgrid(z,0);

Use right click to select the damping:

Figure 5 shows the Step Response of the closed-loop system for Kp=23.7 and ξ=0.4, and the values of the main parameters:

>> G1=23.7/((s+1)*(s+2)*(s+5));
>> sys1=feedback(G1,1);
>> step(sys1);
>> stepinfo(sys1)

Figure 5. Step response of the closed-loop uncompensated system

Suppose now that we want to mantain the damping ratio ξ=0.4, improving rise time and settling time, making the system faster. That would be imposible using only a proportional controller because we are limited by the Root Locus according to Figures 3 and 4.

The uncompensated system of Figure 3 could becomes a compensated system by the addition of a compensating zero at -2, in Figure 6, using a cascade compensator whose transfer function Gc(s) is:

>> G2=((s+2))/((s+1)*(s+2)*(s+5));
>> rlocus(G2);

Figure 6. Root Locus for the compensated system.

Figure 7 shows that we can get a damping ratio ξ=0.4. setting the gain K=51.2:

>> z=0.4;
>> sgrid(z,0);

Use right click to select the damping:

Figure 7. Location in the RL of  ξ=0.4

Figure 8 shows the Step Response of the closed-loop system for Kp=51.2 and ξ=0.4, and the values of the main parameters:

>> G3=(51.2*(s+2))/((s+1)*(s+2)*(s+5));
>> sys2=feedback(G3,1);
>> step(sys2);
>> stepinfo(sys2)

Figure 8. Step response of the closed-loop compensated system

Mantaining the same damping ratio ξ=0.4, Rise Time has improved (from 0.6841 s to 0.1955 s) and Settling Time has improved (from 3.7471 s to 1.1218 s). However, Overshoot has increased (from 23.3070 to 25.3568) and also the Peak has increased (from 0.8672 to 1.1420). Figure 9 compares graphically both of the responses, before and after the PD compensation:

>>step(sys1, sys2)

Figure 9. Step response of Compensated Vs. Uncompensated System.

Figure 9 also shows that the final value is closer to the reference value (1), so the steady-state error has improved with PD compensation (from 0.297 to 0.088). However, readers must not assume that, in general, improvement in transient response always yields an improvement in steady-state error.

Now that we have seen what PD compensation can do, we are ready to design our own PD compensator to meet a transient response specification.

1) Given the system of Figure 10, design PD compensator to yield a 16% overshoot, with a threefold reduction in settling time.

Figure 10.

In construction…

`How do we implement the PD controller?`

The PD compensator used to improve the transient response is implemented with a proportional-plus-derivative (PD) controller. In Figure 11 the transfer function of the controller is:

Figure 11. Implementation of Proportional-plus-Derivative (PD) controller.

`Lead Compensation`

Just as the active ideal integral compensator can be approximated with a passive lag
network, an active ideal derivative compensator can be approximated with a passive
lead compensator. When passive networks are used, a single zero cannot be
produced; rather, a compensator zero and a pole result. However, if the pole is
farther from the imaginary axis than the zero, the angular contribution of the
compensator is still positive and thus approximates an equivalent single zero. In
other words, the angular contribution of the compensator pole subtracts from the
angular contribution of the zero but does not preclude the use of the compensator to improve transient response, since the net angular contribution is positive, just as for a single PD controller zero.

The advantages of a passive lead network over an active PD controller are that
(1) no additional power supplies are required and (2) noise due to differentiation is
reduced.

In construction…

Source:

Written by:

Prof. Larry Francis Obando – Technical Specialist – Educational Content Writer

Copywriting, Content Marketing, Tesis, Monografías, Paper Académicos, White Papers (Español – Inglés)

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, UCV CCs

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, USB Valle de Sartenejas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contact: Caracas, Quito, Guayaquil, Cuenca. telf – 0998524011

WhatsApp: +593998524011   +593981478463

## Mass-Spring-Damper System Dynamics

`Basic elements of a mechanical system.`

The basic elements of any mechanical system are the mass, the spring and the shock absorber, or damper. The study of movement in mechanical systems corresponds to the analysis of dynamic systems. In Robotics, for example, the word Forward Dynamic refers to what happens to actuators when we apply certain forces and torques to them.

The mass, the spring and the damper are basic actuators of the mechanical systems.

Consequently, to control the robot it is necessary to know very well the nature of the movement of a mass-spring-damper system.

In addition, this elementary system is presented in many fields of application, hence the importance of its analysis. Again, in robotics, when we talk about Inverse Dynamic, we talk about how to make the robot move in a desired way, what forces and torques we must apply on the actuators so that our robot moves in a particular way.

 `Attention!` I recommend the book “Mass-spring-damper system, 73 Exercises Resolved and Explained” I have written it after grouping, ordering and solving the most frequent exercises in the books that are used in the university classes of Systems Engineering Control, Mechanics, Electronics, Mechatronics and Electromechanics, among others. If you need to acquire the problem solving skills, this is an excellent option to train and be effective when presenting exams, or have a solid base to start a career on this field. Take a look at the Index at the end of this article.

Before performing the Dynamic Analysis of our mass-spring-damper system, we must obtain its mathematical model. This is the first step to be executed by anyone who wants to know in depth the dynamics of a system, especially the behavior of its mechanical components.

We will begin our study with the model of a mass-spring system.

This is convenient for the following reason. All the mechanical systems have a nature in their movement that drives them to oscillate, as when an object hangs from a thread on the ceiling and with the hand we push it. Or a shoe on a platform with springs. It is good to know which mathematical function best describes that movement.

But it turns out that the oscillations of our examples are not endless. There is a friction force that dampens movement. In the case of the object that hangs from a thread is the air, a fluid. So after studying the case of an ideal mass-spring system, without damping, we will consider this friction force and add to the function already found a new factor that describes the decay of the movement.

`Mass-Spring System.`

The dynamics of a system is represented in the first place by a mathematical model composed of differential equations. In the case of the mass-spring system, said equation is as follows:

This equation is known as the Equation of Motion of a Simple Harmonic Oscillator. Let’s see where it is derived from.

If our intention is to obtain a formula that describes the force exerted by a spring against the displacement that stretches or shrinks it, the best way is to visualize the potential energy that is injected into the spring when we try to stretch or shrink it. The following graph describes how this energy behaves as a function of horizontal displacement:

As the mass m of the previous figure, attached to the end of the spring as shown in Figure 5, moves away from the spring relaxation point x = 0 in the positive or negative direction, the potential energy U (x) accumulates and increases in parabolic form, reaching a higher value of energy where U (x) = E, value that corresponds to the maximum elongation or compression of the spring. The mathematical equation that in practice best describes this form of curve, incorporating a constant k for the physical property of the material that increases or decreases the inclination of said curve, is as follows:

The force is related to the potential energy as follows:

Therefore:

It makes sense to see that F (x) is inversely proportional to the displacement of mass m. Because it is clear that if we stretch the spring, or shrink it, this force opposes this action, trying to return the spring to its relaxed or natural position. For that reason it is called restitution force. The above equation is known in the academy as Hooke’s Law, or law of force for springs. The following is a representative graph of said force, in relation to the energy as it has been mentioned, without the intervention of friction forces (damping), for which reason it is known as the Simple Harmonic Oscillator. It is important to emphasize the proportional relationship between displacement and force, but with a negative slope, and that, in practice, it is more complex, not linear.

Source: Física. Robert Resnick

For an animated analysis of the spring, short, simple but forceful, I recommend watching the following videos: Potential Energy of a Spring, Restoring Force of a Spring

AMPLITUDE AND PHASE: SECOND ORDER II (Mathlets)

Amplitude-and-Phase-2nd-Order-II

Going back to Figure 5:

We go to Newton’s Second Law:

This equation tells us that the vectorial sum of all the forces that act on the body of mass m, is equal to the product of the value of said mass due to its acceleration acquired due to said forces. Considering that in our spring-mass system, ΣF = -kx, and remembering that acceleration is the second derivative of displacement, applying Newton’s Second Law we obtain the following equation:

Fixing things a bit, we get the equation we wanted to get from the beginning:

This equation represents the Dynamics of an ideal Mass-Spring System.

Apart from Figure 5, another common way to represent this system is through the following configuration:

:

In this case we must consider the influence of weight on the sum of forces that act on the body of mass m. The weight P is determined by the equation P = m.g, where g is the value of the acceleration of the body in free fall.

If the mass is pulled down and then released, the restoring force of the spring acts, causing an acceleration ÿ in the body of mass m. We obtain the following relationship by applying Newton:

If we implicitly consider the static deflection, that is, if we perform the measurements from the equilibrium level of the mass hanging from the spring without moving, then we can ignore and discard the influence of the weight P in the equation. If we do y = x, we get this equation again:

`Mass-spring-damper System`

If there is no friction force, the simple harmonic oscillator oscillates infinitely. In reality, the amplitude of the oscillation gradually decreases, a process known as damping, described graphically as follows:

The displacement of an oscillatory movement is plotted against time, and its amplitude is represented by a sinusoidal function damped by a decreasing exponential factor that in the graph manifests itself as an envelope. The friction force Fv acting on the Amortized Harmonic Movement is proportional to the velocity V in most cases of scientific interest. This force has the form Fv = bV, where b is a positive constant that depends on the characteristics of the fluid that causes friction. This friction, also known as Viscose Friction, is represented by a diagram consisting of a piston and a cylinder filled with oil:

The most popular way to represent a mass-spring-damper system is through a series connection like the following:

Figura 6

As well as the following:

In both cases, the same result is obtained when applying our analysis method. Considering Figure 6, we can observe that it is the same configuration shown in Figure 5, but adding the effect of the shock absorber. Applying Newton’s second Law to this new system, we obtain the following relationship:

This equation represents the Dynamics of a Mass-Spring-Damper System.

`Laplace Transform of a Mass-Spring-Damper System`

A solution for equation (37) is presented below:

Equation (38) clearly shows what had been observed previously. An example can be simulated in Matlab by the following procedure:

The shape of the displacement curve in a mass-spring-damper system is represented by a sinusoid damped by a decreasing exponential factor. It is important to understand that in the previous case no force is being applied to the system, so the behavior of this system can be classified as “natural behavior” (also called homogeneous response). Later we show the example of applying a force to the system (a unitary step), which generates a “forced behavior” that influences the final behavior of the system that will be the result of adding both behaviors (natural + forced). Remark: When a force is applied to the system, the right side of equation (37) is no longer equal to zero, and the equation is no longer homogeneous.

The solution for the equation (37) presented above, can be derived by the traditional method to solve differential equations. However, this method is impractical when we encounter more complicated systems such as the following, in which a force f(t) is also applied:

Figura 7

The need arises for a more practical method to find the dynamics of the systems and facilitate the subsequent analysis of their behavior by computer simulation. The Laplace Transform allows to reach this objective in a fast and rigorous way.

In equation (37) it is not easy to clear x(t), which in this case is the function of output and interest. A differential equation can not be represented either in the form of a Block Diagram, which is the language most used by engineers to model systems, transforming something complex into a visual object easier to understand and analyze.The first step is to clearly separate the output function x(t), the input function f(t) and the system function (also known as Transfer Function), reaching a representation like the following:

r(t)=f(t), c(t)=x(t)

The Laplace Transform consists of changing the functions of interest from the time domain to the frequency domain by means of the following equation:

The main advantage of this change is that it transforms derivatives into addition and subtraction, then, through associations, we can clear the function of interest by applying the simple rules of algebra. In addition, it is not necessary to apply equation (2.1) to all the functions f(t) that we find, when tables are available that already indicate the transformation of functions that occur with great frequency in all phenomena, such as the sinusoids (mass system output, spring and shock absorber) or the step function (input representing a sudden change). In the case of our basic elements for a mechanical system, ie: mass, spring and damper, we have the following table:

That is, we apply a force diagram for each mass unit of the system, we substitute the expression of each force in time for its frequency equivalent (which in the table is called Impedance, making an analogy between mechanical systems and electrical systems) and apply the superposition property (each movement is studied separately and then the result is added).

Figure 2.15 shows the Laplace Transform for a mass-spring-damper system whose dynamics are described by a single differential equation:

The system of Figure 7 allows describing a fairly practical general method for finding the Laplace Transform of systems with several differential equations. First the force diagram is applied to each unit of mass:

For Figure 7 we are interested in knowing the Transfer Function G(s)=X2(s)/F(s).

Arranging in matrix form the equations of motion we obtain the following:

Equations (2.118a) and (2.118b) show a pattern that is always true and can be applied to any mass-spring-damper system:

The immediate consequence of the previous method is that it greatly facilitates obtaining the equations of motion for a mass-spring-damper system, unlike what happens with differential equations. In addition, we can quickly reach the required solution. In the case of our example:

Where:

These are results obtained by applying the rules of Linear Algebra, which gives great computational power to the Laplace Transform method.

`Application examples ...under construction`

Example 1.

Exercise B318, Modern_Control_Engineering, Ogata 4t p 149 (162),

Example 2.

`Rotational Case`

So far, only the translational case has been considered. In the case that the displacement is rotational, the following table summarizes the application of the Laplace transform in that case:

Example:

The following figures illustrate how to perform the force diagram for this case:

Therefore:

Being:

We observe that again it is true that:

`Bibliography`

:

 `Attention!` I recommend the book “Mass-spring-damper system, 73 Exercises Resolved and Explained” I have written it after grouping, ordering and solving the most frequent exercises in the books that are used in the university classes of Systems Engineering Control, Mechanics, Electronics, Mechatronics and Electromechanics, among others. If you need to acquire the problem solving skills, this is an excellent option to train and be effective when presenting exams, or have a solid base to start a career on this field.  INDEX Preface ii Introduction iii  Chapter 1———————————————————- 1 o Mass-spring-damper System (translational mechanical system)  Chapter 2———————————————————- 51 o Mass-spring-damper System (rotational mechanical system)  Chapter 3———————————————————- 76 o Mechanical Systems with gears  Chapter 4———————————————————- 89 o Electrical and Electronic Systems  Chapter 5——————————————————— 114 o Electromechanical Systems – DC Motor  Chapter 6——————————————————— 144 o Liquid level Systems  Chapter 7——————————————————— 154 o Linearization of nonlinear Systems  References——————————————————- 164
 `Attention!` If what you need is to determine the Transfer Function of a System … We deliver the answer in two hours or less, depending on the complexity. In digital Contact us, immediate response, solve and deliver the transfer function of mass-spring-damper systems, electrical, electromechanical, electromotive, liquid level, thermal, hybrid, rotational, non-linear, etc. Optional, Representation in State Variables. Simulation in Matlab, Optional, Interview by Skype to explain the solution. WhatsApp +593981478463, Inmediate attention !! email: dademuchconnection@gmail.com  Service: 10 \$ by problem.

Written by Prof. Larry Francis Obando – Technical Specialist – Educational Content Writer

Mentoring Académico / Emprendedores / Empresarial

Copywriting, Content Marketing, Tesis, Monografías, Paper Académicos, White Papers (Español – Inglés)

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, UCV CCs

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, USB Valle de Sartenejas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contact: Caracas, Quito, Guayaquil, Cuenca. telf – 0998524011

WhatsApp: +593981478463

## Dynamik eines Masse-Feder-Dämpfer-Systems

Die Grundelemente eines jeden mechanischen Systems sind die Masse, die Feder und der Stoßdämpfer. Das Studium der Bewegung in mechanischen Systemen entspricht der Analyse dynamischer Systeme. In der Robotik zum Beispiel bezieht sich das Wort Vorwärtsdynamik darauf, was mit Aktuatoren passiert, wenn wir bestimmte Kräfte und Drehmomente auf sie anwenden.

Die Masse, die Feder, der Stoßdämpfer sind elementare Aktuatoren eines mechanischen Systems.

Um den Roboter zu steuern, ist es folglich notwendig, die Art der Bewegung eines Masse-Feder-Dämpfer-Systems sehr gut zu kennen.

Darüber hinaus wird dieses elementare System in vielen Anwendungsbereichen vorgestellt, daher die Wichtigkeit seiner Analyse. Wenn wir in der Robotik über Inverse Dynamic sprechen, sprechen wir darüber, wie man den Roboter auf eine gewünschte Art und Weise bewegt, welche Kräfte und Drehmomente wir auf die Aktoren anwenden müssen, damit sich unser Roboter auf eine bestimmte Art bewegt.

Bevor wir die dynamische Analyse unseres Masse-Feder-Dämpfer-Systems durchführen, müssen wir sein mathematisches Modell erhalten. Dies ist der erste Schritt für jeden, der die Dynamik eines Systems, insbesondere das Verhalten seiner mechanischen Komponenten, genau kennenlernen möchte.

Wir werden unsere Studie mit dem Modell eines Masse-Feder-Systems beginnen.

Dies ist aus folgendem Grund praktisch. Alle mechanischen Systeme haben eine Art in ihrer Bewegung, die sie zum Schwingen bringt, etwa wenn ein Gegenstand an einem Faden an der Decke hängt und mit der Hand, die wir drücken. Oder ein Schuh auf einer Plattform mit Federn. Es ist gut zu wissen, welche mathematische Funktion diese Bewegung am besten beschreibt.

`Masse-Feder-System.`

Die Dynamik eines Systems wird in erster Linie durch ein mathematisches Modell dargestellt, das aus Differentialgleichungen besteht. Im Falle des Masse-Feder-Systems ist diese Gleichung wie folgt:

Diese Gleichung ist als Bewegungsgleichung eines einfachen harmonischen Oszillators bekannt. Mal sehen, woher es stammt.

Wenn wir eine Formel erhalten wollen, die die Kraft beschreibt, die eine Feder gegen die Verschiebung ausübt, die sie dehnt oder schrumpft, ist es am besten, die potentielle Energie zu visualisieren, die in die Feder injiziert wird, wenn wir sie dehnen oder schrumpfen. Die folgende Grafik beschreibt, wie sich diese Energie als Funktion der horizontalen Verschiebung verhält:

Wenn sich die Masse m der vorhergehenden Figur, die an dem Ende der Feder angebracht ist, wie in Abbildung 5 gezeigt, von dem Federrelaxationspunkt x = 0 weg in die positive oder negative Richtung bewegt, sammelt sich die potentielle Energie U (x) an und steigt in parabolischer Form an und erreicht einen höheren Energiewert, wobei       U(x) = E, Wert, der der maximalen Dehnung oder Kompression der Feder entspricht. Die mathematische Gleichung, die in der Praxis diese Kurvenform am besten beschreibt und eine Konstante k für die physikalische Eigenschaft des Materials enthält, die die Steigung der Kurve erhöht oder verringert, ist die folgende:

Die Kraft ist auf folgende Weise mit der potentiellen Energie verbunden:

Deshalb:

Es ist sinnvoll zu sehen, dass F (x) umgekehrt proportional zur Verschiebung der Masse m ist. Denn es ist klar, dass, wenn wir die Feder dehnen oder schrumpfen, diese Kraft dieser Aktion entgegenwirkt und versucht, die Feder in ihre entspannte oder natürliche Position zurückzubringen. Aus diesem Grund heißt es Restitutionskraft. Die obige Gleichung ist in der Akademie als Hookes Gesetz oder Kraftgesetz für Federn bekannt. Das Folgende ist ein repräsentatives Diagramm dieser Kraft in Bezug auf die Energie, wie sie erwähnt wurde, ohne den Eingriff von Reibungskräften (Dämpfung), weshalb sie als der einfache harmonische Oszillator bekannt ist. Es ist wichtig, die proportionale Beziehung zwischen Verschiebung und Kraft zu betonen, aber mit einer negativen Steigung, und das ist in der Praxis komplexer, nicht linear.

Siehe: AMPLITUDE AND PHASE: SECOND ORDER II (Mathlets)

Nach Newtons zweitem Gesetz:

Diese Gleichung sagt uns, dass die vektorielle Summe aller Kräfte, die auf den Körper der Masse m einwirken, gleich dem Produkt des Wertes der Masse aufgrund ihrer Beschleunigung ist, die aufgrund der Kräfte erhalten wird. Mit Newtons zweitem Gesetz erhalten wir die folgende Gleichung:

Das ist:

Diese Gleichung repräsentiert die Dynamik eines idealen Masse-Feder-Systems.

`System Masse-Feder-Stoßdämpfer`

Wenn keine Reibungskraft vorhanden ist, oszilliert der einfache harmonische Oszillator unendlich. In Wirklichkeit nimmt die Amplitude der Oszillation allmählich ab, ein Prozess, der als Dämpfung bekannt ist und im folgenden graphisch beschrieben wird:

Die Verschiebung einer oszillierenden Bewegung ist gegen die Zeit aufgetragen, und ihre Amplitude wird durch eine sinusförmige Funktion dargestellt, die durch einen abnehmenden Exponentialfaktor gedämpft wird, der in dem Graphen als eine Hüllkurve erscheint. Die Reibungskraft Fv, die auf die amortisierte harmonische Bewegung einwirkt, ist in den meisten Fällen von wissenschaftlichem Interesse proportional zur Geschwindigkeit V. Diese Kraft hat die Form Fv = bV, wobei b eine positive Konstante ist, die unter anderem von den Eigenschaften des Fluids abhängt, das Reibung verursacht. Diese Reibung, auch bekannt als Viskosereibung, wird durch ein Diagramm dargestellt, das aus einem Kolben und einem mit Öl gefüllten Zylinder besteht:

Die gängigste Art, ein Masse-Feder-Dämpfer-System darzustellen, ist eine Reihenschaltung wie folgt:

Sowie die folgenden:

In beiden Fällen wird das gleiche Ergebnis bei Anwendung unserer Analysemethode erhalten. Wenn man Fig. 6 betrachtet, kann man sehen, dass dieselbe Konfiguration wie in Fig. 5 gezeigt ist, jedoch die Wirkung des Stoßdämpfers hinzugefügt wird. Indem wir Newtons zweites Gesetz auf dieses neue System anwenden, erhalten wir die folgende Beziehung:

Diese Gleichung repräsentiert die Dynamik eines Massen-Feder-Schock-Systems.

Das könnte dich interessieren:

Geschrieben von:

Prof. Larry Francis Obando – Technical Specialist – Educational Content Writer

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, Caracas.

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, Valle de Sartenejas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contact: Caracas, Quito, Guayaquil, Cuenca – Telf. 00593998524011

WhatsApp: +593981478463

Control System Analysis

## Example 1 – Transfer Function of a liquid-level system

We take into account the system of the Figure 3-23.

In accordance with the definitions of the previous article (Dinámica de un sistema de nivel de líquidos), we focus on the capacitances C1 and C2, as well as on the resistors R1 and R2. Thus, the dynamics of this system is determined by the following equations:

From here we can obtain the transfer function depending on what variables we define as input and output. For example, suppose the input to the system is q and the output variable is q2, so to find the transfer function of the system we execute the following operations:

So:

That is to say:

In the other hand:

That is:

Also:

Applying Laplace to equations a, b and c, we obtain:

Clearing H1(s) of e and substituting this value in d we obtain:

An due to the latter is:

The transfer function of the system is:

Written by: Larry Francis Obando – Technical Specialist – Educational Content Writer.

Mentoring Académico / Emprendedores / Empresarial.

Copywriting, Content Marketing, Tesis, Monografías, Paper Académicos, White Papers (Español – Inglés)

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, Caracas.

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, Valle de Sartenejas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contact: Caracas, Quito, Guayaquil, Cuenca – Telf. 00593998524011

WhatsApp:+593981478463

+593998524011

## PID – Study of the proportional action with Matlab

To make the study of proportional action, consider the following system:

1. Implement the locus of the roots indicating the points of interest. We execute the following commands in Matlab:

>> s=tf(‘s’)

>> s1=(1)/(0.2*s+1)

>> s2=(2)/(0.1*s+1)

>> s3=(1)/(s+1)

>> G=s1*s2*s3

The direct transfer function G(s) is:Reshaping:If we add a proportional controller with a gain Kp, the direct transfer function G(s) is:Th closed-loop transfer function Gce(s) is:

The characteristic equation is:The characteristic equation in its form 1+G(s)H(s) is:

To obtain in Matlab the locus of the roots, we execute the following command:

>> rlocus(G)

We obtain:

Through this first exercise we get the locus of the roots of the system, we can observe the most immediate effect of applying a proportional controller: the displacement of the roots.

The change in the gain Kp allows us to change the value of the roots of the characteristic equation (when traveling through the blue, green and red lines of the locus in the previous graph, we see how the Kp gain changes), which is the same as changing the poles of the closed-loop transfer function. By changing these poles, we change the value of the damping coefficient ζ and the natural frequency ωn for a unit step input, thus adapting the transient response of the system to the design requirements that can be requested.

Note that the roots of the characteristic equation are in s=-10, s=-5 and s=-1, when Kp=0.

But in real terms Kp can not be zero, because in practice it means that we cancel the input to the system and thus, the output is zero as well. To represent the system operating without the proportional controller, we do Kp = 1. Under this condition, let’s see what is the value of ζ, as well as the value of three quantities of extreme importance for the designers: the overshoot Mp, the rise time Tr and the steady-state error ess. Then, suppose we want to modify this performance in terms of ζ and we vary Kp (we move the roots) until we achieve ζ = 0.5.

`Kp=1`

If Kp=1, then:

The closed-loop transfer function Gce(s) is:

We use the following commands in Matlab to know the values of ζ, the overshoot and the time of establishment:

> >Gce=feedback(G,1)

> >damp(Gce)

We obtain:

 Pole Damping Frequency -2.26e+00 + 2.82e+00i 6.26e-01 3.62e+00 -2.26e+00 – 2.82e+00i 6.26e-01 3.62e+00 -1.15e+01 1.00e+00 1.15e+01

Note that in the previous graph, Kp = Gain = 1. The dominant complex roots are s1 = -2.26 + j2.82 and s2 = -2.26-j2.82, so that, according to the graph, we can consider ζ = 0.626 when Kp = 1. Regarding the overshoot, the rise time and the steady-state error we use the following command:

>> stepinfo(Gce)

RiseTime: 0.5626

Overshoot: 7.5449

Peak: 0.7170

>> step(Gce)

If the input is the unit step and the output reaches the final value of c = 0.663, the steady-state error is ess = 1-0.663 = 0.337. We will see that despite varying the value of Kp and moving the roots, the proportional controller does not completely cancel out the steady-state error, it will always have a value different from zero, so an integral action is required to annul this error. On the other hand, the value of the overshoot is Mp = 7.17%, taking into account that the final value of the system is c = 0.663 and the maximum value reached is of c = 0.7170.

`Find Kp to achieve ζ = 0.5.`

The locus of the roots allows us to vary the value of the gain Kp until reaching the requested damping, ζ = 0.5. We move on the geometric place of the roots in Matlab by clicking on the line of the dominant poles and dragging the point until it reaches the requested damping:

The previous graph shows us that we can obtain a ζ = 0.5 when the gain Kp has an approximate value of 1.46. If Kp = 1.46, the direct transfer function and the closed-loop transfer function are:

We confirm the value of the damping by:

>> Gce2=(146)/(s^3+16*s^2+65*s+196)

> >damp(Gce2)

 Pole Damping Frequency -2.04e+00 + 3.51e+00i 5.02e-01 4.05e+00 -2.26e+00  – 3.51e+00i 5.02e-01 4.05e+00 -1.19e+01 1.00e+00 1.19e+01

> >stepinfo(Gce2)

RiseTime: 0.4356

Overshoot: 15.0397

Peak: 0.8569

It is observed that the overshoot will be higher (from 7.5449 to 15.0397) after the compensation (change the Kp value from 1 to 1.46) because the damping ζ is lower (from 0.626 to 5.02), while the rise time Tr improves slightly (from 0.5626 to 0.4356)

The answers to the unit step input of both systems (before and after the compensation), can be observed by the following Matlab command:

>> step(Gce,Gce2)

The final value of the system after the compensation (in red color) is approximately c = 0.748, so the steady-state error in this case is slightly lower, ess = 1-0.748 = 0.252. It is clearly seen in the graph that the rise time is shorter after the compensation, but at the cost of a larger overshoot due to a smaller damping.

Another more sophisticated Matlab tool to design compensators is SISO Design Tool. It can be called with rltool.

`>> rltool`

The graphical user interface is opened (GUI).

Once there, we can import systems fron the Matlab console through file>import>G>browse>available models>G>import>close>ok.

Supongamos el requerimiento ζ=0.5. Placing the cursor on the locus, we right click and select design requirement>new>design requirement type>damping ratio>0.5>ok.

The lower legend is obtained by placing the course on the pink dot, a hand is formed and left click. We can vary the graph until we achieve approximately the desired damping. If we place the course on the left side of the graph (white color), the legend appears Loop gain changed to 1.47. That is to say Kp=1.47.

Although, to be more exact, the value of the gain is Kp = 1.4663. This value can be seen in the other window that opens simultaneously with the Editor: Control and estimation tools manager. There, when selecting the Compensator Editor tab, we can see that C = 1.4663. Therefore, the tool allows us to be much more specific in terms of the value of the gain.

Going back to the graphic editor (SISO design task), we select analysis>response to step command, we obtain the unit step response in a new window. Once there, right click, we select plot type>step. We can see the value of main characteristics of transient response with Kp=1.46:

characteristics>rise time

characteristics>peak response

`Respuesta transitoria para diferentes valores de Kp.`

To complete the study it is only necessary to assign several values to Kp and analyze the transient response as well as the steady-state error of the different systems, through the programming tools presented so far. It should be noted how sensitive the system is for very close Kp values. This is shown in the following graph where the answers to the unit step input appear simultaneously for different values of Kp:

Kp=0.2, Kp=0.5, Kp=1, Kp=1.5,  Kp=1.7, Kp=2.

Written by: Larry Francis Obando – Technical Specialist – Educational Content Writer.

Mentoring Académico / Empresarial / Emprendedores

Copywriting, Content Marketing, Tesis, Monografías, Paper Académicos, White Papers (Español – Inglés)

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, Caracas.

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, Valle de Sartenejas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contact: Caracas, Quito, Guayaquil, Cuenca – Telf. 00593998524011

WhatsApp: +593981478463

+593998524011

## Example 1 – PI Controller Design (Proportional-Integral) – Matlab

To better appreciate the effect of the PI controller, let’s look at the following example. Suppose we have the system of Figure 7-23.

The direct transfer function G(s) for this system is as follows:

Where K is the pre-amplifier constant.

Teh design specifications for this system are:

Donde:

• ess: steady-state error due to a parabolic input
• Mp: Maximum overshoot
• Tr: Rise time
• Ts: Settling time

The first thing we are going to do is analyze the steady-state error ess of the system before compensating, and see how much it meets or not with the first design requirement.

For a parabolic input we must work with the acceleration constant Ka:This means an infinite error for a parabolic input:To improve the steady-state error we incorporate a PI controller in the direct path of the system, which will now have the following transfer function:
By increasing the typology of the system from type 1 to type 2 we immediately improve the steady-state error. Now, the ess due to the parabolic input will be a constant:
That is to say:

This exercise we already worked with the PD controller. For that case we select a value of K=181.17 (Example 1 – PD Controller Design (Proportional-Diferential) – Matlab)

We allow ourselves the freedom to consider the same value for K in this case in order to maintain the transient response under acceptable and known conditions when applying the PD of Example 1. If necessary we will adjust the value of K later. We can appreciate that to achieve an ess as specified in the design, the larger K is, the smaller will have to be Ki, which may be convenient. With the values of K and ess we can calculate a first approximate value of Ki to meet the requirements:

The next thing we will do is analyze the stability of the system because the selection of the Kp and Ki parameters depends on it. We will apply the Routh-Hurwitz criterion to calculate the limit values of the mentioned parameters in such a way that the system remains stable. For this we need the characteristic equation that arises from the transfer function of the closed loop system Gce(s):

The characteristic equation of the system is:

With this equation we apply the Routh-Hurwitz criterion. In this way we discovered that the system is stable for the following range of values:

This result indicates that the Ki / Kp of the controller can not be very close to zero, so a value as low as Ki = 0.002215 is not convenient. Another criterion for selecting Ki / Kp is that it is convenient to select the zero added by the controller in s = -Ki / Kp so that it is located near the origin and far from the most significant poles of the system. Through the locus of the roots in Matlab we can see which are the most significant poles of the characteristic equation, assuming an acceptable relationship between the Ki and Kp parameters from the point of view of the previous stability study but relatively close to the origin, say Ki / Kp = 10, keeping Ki constant and varying Kp.

First, we reshape the characteristic equation in its form 1+G(s)H(s):

Note that in this way the controller PI is adding a zero in s=-10.

We apply the following command in Matlab to obtain the locus of the roots of this compensated system:

>> s=tf(‘s’)

>> sys=(815265*(s+10))/(s^3+361.2*s^2)

>> rlocus(sys)

So we get:

As it can be seen, the most significant pole of the characteristic equation is located in s=-361. Therefore, the criterion that we must use to select s=-Ki/Kp is:With this result, the direct transfer function G(s):It would be simplified as:

The term Ki / Kp would be negligible compared to the magnitude of s when s assumes values along the root locus that corresponds to a convenient relative damping factor of 0.7 <ζ <0.1. Then, a zero cancels a pole at zero. The maximum overshoot must be equal to or less than 5%. This means that you want a relative damping factor ζ approximate to the following:

With the help of the locus we can locate the poles that correspond to this value of ζ:

According to the graph, the value of Kp required to obtain the desired damping factor is:

And so:

We also observe in the previous graph that if Kp = 0.0838, then the roots of the characteristic equation (the poles of the system) are in s1 = -175 + j184 and in s2 = -175-j184 If we look around these roots we can notice that the zero added by the controller at s = -10 is very close to the origin compared to the poles of s1 and s2, practically canceling a pole at the origin, thus ratifying the approach we made earlier for the direct transfer function of this system then of the compensation:

So:

We can observe the response to the step according to these partial results and the comparison of the compensated and uncompensated systems, by means of the following simulation:

>> Ga=(815265)/(s*(s+361.2))

>> Gd=(68319)/(s*(s+361.2))

>> Gce1=feedback(Ga,1)

>> Gce2=feedback(Gd,1)

>> step(Gce1,Gce2)

The previous graph, with the system after the compensation in red line, shows that the PI improves the steady-state error and reduces the overshoot, but at the expense of significantly increasing the rise time. The graph also shows that the maximum overshoot is 5%, therefore the requirement is met. It is necessary to note that another relationship can be selected for Ki and Kp that meets the requirement and still improve the overshoot, for example Ki / Kp = 5, or Ki / Kp = 2. You just have to pay attention to the issue of the stability of the system. With the calculated values, we re-calculate the overshoot, and we evaluate the rise time tr and the settlement time ts . The following command gives us the value of ζ and ωn, the relative damping factor and the natural frequency respectively.

>> damp(Gce2)

Pole: -1.81e+02 + 1.89e+02i /   -1.81e+02 + 1.89e+02i

Damping: 6.91e-01

Frequency: 2.61e+02

•  Maximum Overshoot (MP):

• Rise Time (Tr):

>> Gd=(68319)/(s*(s+361.2))

>> sys=feedback(Gd,1)

>> step(sys)

• Settling time (Ts):

Values that we can also see in the response to the step input graph generated previously:

We can conclude that the compensated system fulfills the requirements of the design, although it exceeds a little in the settling time. The latter can be reduced slightly with a Ki / Kp = 2 ratio, but at the expense of getting too close to the unstable area of the system

Written by: Larry Francis Obando – Technical Specialist – Educational Content Writer.

Mentoring Académico / Empresarial / Emprendedores

Copywriting, Content Marketing, Tesis, Monografías, Paper Académicos, White Papers (Español – Inglés)

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, Caracas.

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, Valle de Sartenejas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contact: Caracas, Quito, Guayaquil, Cuenca – Telf. 00593998524011

WhatsApp: +593981478463

+593998524011

Respuesta Transitoria de un Sistema de Control

Estabilidad de un sistema de control

Simulación de Respuesta Transitoria con Matlab – Introducción

## Example 1 – Linearization of non-linear systems.

`Linearize a function`

Suppose we have a system represented by the following function:
Our task is to linearize f (x) around xo = π / 2. As:
We find the following values and substitute them in the previous equation:
Then we can represent our nonlinear system by means of the following negative line equation:

The result of the linearization of f (x) around xo = π / 2 can be seen in Figure 2.48:

`Linearize a differential equation`

Suppose now that our system is represented by the following differential equation:
The presence of the term cosx makes the previous one a non-linear equation. It is requested to linearize said equation for small excursions around x = π / 4.

To replace the independent variable x with the excursion δx, we take advantage of the fact that:
So:We proceed then to the substitution in the differential equation:We now apply the derivation rules:And for the term that involves the cosx function we apply the same methodology that we have just seen in the previous example for a given function, that is, linearize f (x) around xo = π / 4:

Note that in the previous equation the excursion is zero when the function is evaluated exactly at the point xo. The same happens when the slope is evaluated in xo:So:

Therefore, we can rewrite the differential equation in a linear fashion around the point xo =π /4 as follows:

That is to say:

Written by: Larry Francis Obando – Technical Specialist – Educational Content Writer.

Mentoring Académico / Empresarial / Emprendedores

Copywriting, Content Marketing, Tesis, Monografías, Paper Académicos, White Papers (Español – Inglés)

Escuela de Ingeniería Eléctrica de la Universidad Central de Venezuela, Caracas.

Escuela de Ingeniería Electrónica de la Universidad Simón Bolívar, Valle de Sartenejas.

Escuela de Turismo de la Universidad Simón Bolívar, Núcleo Litoral.

Contact: Caracas, Quito, Guayaquil, Cuenca – Telf. 00593998524011

WhatsApp: +593981478463

+593998524011