Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ABSTRACT:
A proportionalintegralderivative
controller (PID
controller)
is
a
generic control
loop feedback
mechanism A PID controller calculates an "error" value
as the difference between a measured process
variable and a desired set point. The controller attempts
to minimize the error by adjusting the process control
inputs.
RESUMEN:
El regulador ms usado en control de procesos es el
PID cuya representacin es la siguiente:
INTRODUCCION:
Las ecuaciones que gobiernan el movimiento de un
avin es un conjunto de seis ecuaciones diferenciales
no lineales acopladas muy complicado. Sin embargo,
bajo ciertas consideraciones, pueden linealizarse y
OBJETIVOS:
1.
2.
d(k,1)=k;
d(k,2)=xg(k);
d(k,3)=1;
d(k,4)=tg(k);
end
c
d
SOFTWARE UTILIZADO:
MatLab
C#
%-------------------------------------------------------------------------
PROCEDIMIENTO:
52.0000
53.0000
54.0000
55.0000
56.0000
57.0000
58.0000
59.0000
60.0000
61.0000
62.0000
63.0000
64.0000
65.0000
66.0000
67.0000
68.0000
69.0000
70.0000
71.0000
72.0000
73.0000
74.0000
75.0000
76.0000
77.0000
78.0000
79.0000
80.0000
81.0000
82.0000
83.0000
84.0000
85.0000
86.0000
87.0000
88.0000
89.0000
90.0000
91.0000
92.0000
93.0000
94.0000
95.0000
96.0000
97.0000
98.0000
99.0000
100.0000
es:
0
0.0056
0.0221
0.0486
0.0844
0.1286
0.1806
0.2393
0.3040
0.3738
0.4480
0.5257
0.6062
0.6887
0.7726
0.8571
0.9416
1.0255
1.1084
1.1897
1.2690
1.3459
1.4201
1.4912
1.5590
1.6234
1.6841
1.7411
1.7943
1.8437
1.8892
1.9310
1.9690
2.0034
2.0343
2.0619
2.0862
2.1076
2.1262
2.1421
2.1557
2.1671
2.1765
2.1843
2.1905
2.1955
2.1994
2.2025
2.2049
2.2069
2.2087
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
0
0.1000
0.2000
0.3000
0.4000
0.5000
0.6000
0.7000
0.8000
0.9000
1.0000
1.1000
1.2000
1.3000
1.4000
1.5000
1.6000
1.7000
1.8000
1.9000
2.0000
2.1000
2.2000
2.3000
2.4000
2.5000
2.6000
2.7000
2.8000
2.9000
3.0000
3.1000
3.2000
3.3000
3.4000
3.5000
3.6000
3.7000
3.8000
3.9000
4.0000
4.1000
4.2000
4.3000
4.4000
4.5000
4.6000
4.7000
4.8000
4.9000
5.0000
2.2103
2.2120
2.2140
2.2163
2.2191
2.2225
2.2266
2.2315
2.2372
2.2439
2.2515
2.2601
2.2697
2.2804
2.2921
2.3048
2.3185
2.3333
2.3489
2.3656
2.3830
2.4014
2.4205
2.4403
2.4608
2.4819
2.5036
2.5257
2.5483
2.5713
2.5946
2.6181
2.6418
2.6657
2.6896
2.7136
2.7376
2.7616
2.7855
2.8093
2.8329
2.8563
2.8796
2.9026
2.9254
2.9479
2.9701
2.9921
3.0138
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
5.1000
5.2000
5.3000
5.4000
5.5000
5.6000
5.7000
5.8000
5.9000
6.0000
6.1000
6.2000
6.3000
6.4000
6.5000
6.6000
6.7000
6.8000
6.9000
7.0000
7.1000
7.2000
7.3000
7.4000
7.5000
7.6000
7.7000
7.8000
7.9000
8.0000
8.1000
8.2000
8.3000
8.4000
8.5000
8.6000
8.7000
8.8000
8.9000
9.0000
9.1000
9.2000
9.3000
9.4000
9.5000
9.6000
9.7000
9.8000
9.9000
1.0000
2.0000
3.0000
4.0000
5.0000
6.0000
7.0000
8.0000
9.0000
10.0000
11.0000
12.0000
13.0000
14.0000
15.0000
16.0000
17.0000
18.0000
19.0000
20.0000
21.0000
22.0000
23.0000
24.0000
25.0000
26.0000
27.0000
28.0000
29.0000
30.0000
31.0000
32.0000
33.0000
34.0000
35.0000
36.0000
37.0000
38.0000
39.0000
40.0000
41.0000
42.0000
43.0000
44.0000
45.0000
46.0000
47.0000
48.0000
49.0000
50.0000
51.0000
52.0000
53.0000
54.0000
55.0000
56.0000
57.0000
0
0.0002
0.0015
0.0049
0.0114
0.0218
0.0368
0.0569
0.0827
0.1143
0.1520
0.1957
0.2454
0.3008
0.3615
0.4270
0.4967
0.5698
0.6456
0.7231
0.8014
0.8795
0.9564
1.0309
1.1021
1.1689
1.2302
1.2851
1.3327
1.3721
1.4026
1.4233
1.4338
1.4336
1.4224
1.3998
1.3659
1.3206
1.2641
1.1966
1.1187
1.0309
0.9338
0.8282
0.7150
0.5953
0.4700
0.3405
0.2077
0.0731
-0.0620
-0.1963
-0.3285
-0.4573
-0.5813
-0.6992
-0.8098
58.0000
59.0000
60.0000
61.0000
62.0000
63.0000
64.0000
65.0000
66.0000
67.0000
68.0000
69.0000
70.0000
71.0000
72.0000
73.0000
74.0000
75.0000
76.0000
77.0000
78.0000
79.0000
80.0000
81.0000
82.0000
83.0000
84.0000
85.0000
86.0000
87.0000
88.0000
89.0000
90.0000
91.0000
92.0000
93.0000
94.0000
95.0000
96.0000
97.0000
98.0000
99.0000
100.0000
0
0
0.0998 0.1000
0.1987 0.2000
0.2955 0.3000
0.3894 0.4000
0.4794 0.5000
0.5646 0.6000
0.6442 0.7000
0.7174 0.8000
0.7833 0.9000
0.8415 1.0000
0.8912 1.1000
0.9320 1.2000
0.9636 1.3000
0.9854 1.4000
0.9975 1.5000
0.9996 1.6000
0.9917 1.7000
0.9738 1.8000
0.9463 1.9000
0.9093 2.0000
0.8632 2.1000
0.8085 2.2000
0.7457 2.3000
0.6755 2.4000
0.5985 2.5000
0.5155 2.6000
0.4274 2.7000
0.3350 2.8000
0.2392 2.9000
0.1411 3.0000
0.0416 3.1000
-0.0584 3.2000
-0.1577 3.3000
-0.2555 3.4000
-0.3508 3.5000
-0.4425 3.6000
-0.5298 3.7000
-0.6119 3.8000
-0.6878 3.9000
-0.7568 4.0000
-0.8183 4.1000
-0.8716 4.2000
-0.9162 4.3000
-0.9516 4.4000
-0.9775 4.5000
-0.9937 4.6000
-0.9999 4.7000
-0.9962 4.8000
-0.9825 4.9000
-0.9589 5.0000
-0.9258 5.1000
-0.8835 5.2000
-0.8323 5.3000
-0.7728 5.4000
-0.7055 5.5000
-0.6313 5.6000
-0.9119
-1.0045
-1.0865
-1.1571
-1.2153
-1.2607
-1.2925
-1.3104
-1.3140
-1.3034
-1.2784
-1.2391
-1.1860
-1.1195
-1.0400
-0.9484
-0.8454
-0.7320
-0.6093
-0.4785
-0.3407
-0.1973
-0.0497
0.1006
0.2523
0.4037
0.5535
0.7002
0.8422
0.9782
1.1069
1.2268
1.3369
1.4360
1.5232
1.5974
1.6581
1.7045
1.7361
1.7526
1.7539
1.7399
1.7106
-0.5507
-0.4646
-0.3739
-0.2794
-0.1822
-0.0831
0.0168
0.1165
0.2151
0.3115
0.4048
0.4941
0.5784
0.6570
0.7290
0.7937
0.8504
0.8987
0.9380
0.9679
0.9882
0.9985
0.9989
0.9894
0.9699
0.9407
0.9022
0.8546
0.7985
0.7344
0.6630
0.5849
0.5010
0.4121
0.3191
0.2229
0.1245
0.0248
-0.0752
-0.1743
-0.2718
-0.3665
-0.4575
5.7000
5.8000
5.9000
6.0000
6.1000
6.2000
6.3000
6.4000
6.5000
6.6000
6.7000
6.8000
6.9000
7.0000
7.1000
7.2000
7.3000
7.4000
7.5000
7.6000
7.7000
7.8000
7.9000
8.0000
8.1000
8.2000
8.3000
8.4000
8.5000
8.6000
8.7000
8.8000
8.9000
9.0000
9.1000
9.2000
9.3000
9.4000
9.5000
9.6000
9.7000
9.8000
9.9000
Entrada seno
Desarrollo completo de c#
Para una entrada seno:
CDIGO EN C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;
using ZedGraph;
using Tao.OpenGl;
using Tao.Platform.Windows;
Entrada escaln
namespace Lab_3
{
Graph.GraphPane.AddCurve("R", new
RollingPointPairList(2000), Color.Blue,
SymbolType.Circle);
list1 = Graph.GraphPane.CurveList[0].Points as
IPointListEdit;
list2 = Graph.GraphPane.CurveList[1].Points as
IPointListEdit;
}
private void DoGraph()
{
Datos.Text += K[K.Length - 1].ToString() + "\t";
Datos.Text +=
decimal.Round((Decimal)Cs[Cs.Length - 1], 2).ToString()
+ "\t";
Datos.Text +=
decimal.Round((Decimal)Rs[Rs.Length - 1], 2).ToString()
+ "\t";
Datos.Text += time[time.Length - 1].ToString() +
"\r\n";
list1.Add(time[time.Length - 1], Cs[Cs.Length 1]);
list2.Add(time[time.Length - 1], Rs[Rs.Length 1]);
Array.Resize(ref Cs, Cs.Length + 1);
Array.Resize(ref Rs, Rs.Length + 1);
Array.Resize(ref time, time.Length + 1);
Array.Resize(ref K, K.Length + 1);
K[K.Length - 1] = K[K.Length - 2] + 1;
if (time[time.Length - 2] >
Graph.GraphPane.XAxis.Scale.Max)
{
Graph.GraphPane.XAxis.Scale.Max =
time[time.Length - 2] + 1;
Graph.GraphPane.XAxis.Scale.Min =
time[time.Length - 2] - 4;
}
Graph.AxisChange();
Graph.Refresh();
}
public void Charge_Animation()
{
Gl.glClear(Gl.GL_COLOR_BUFFER_BIT |
Gl.GL_DEPTH_BUFFER_BIT);
Gl.glLoadIdentity();
Gl.glEnable(Tao.OpenGl.Gl.GL_DEPTH_TEST);
Gl.glPushMatrix();
Gl.glRotatef(Cs[Cs.Length - 1], 0, 0, 1);
LA1.Dibujar();
Gl.glTranslatef(-350,-30,0);
Gl.glScalef(0.5f, 0.5f, 0.5f);
Gl.glRotatef((float)Ref, 0, 0, 1);
LA2.Dibujar();
Gl.glPopMatrix();
Gl.glDisable(Gl.GL_DEPTH_TEST);
SOC.Draw();
}
#endregion
#region Funciones de control
public Form1()
{
InitializeComponent();
SOC.InitializeContexts();
Charge_Graphics();
Charge_Ambient();
}
#region Funciones de animacion
public void Charge_Ambient()
{
Gl.glMatrixMode(Gl.GL_PROJECTION);
Gl.glViewport(0, 0, SOC.Width, SOC.Height);
//Gl.glRotatef(90, 1, 0, 0);
Gl.glTranslatef(0f, 0f, 0f);
Gl.glOrtho(-600, 600, -400, 400, -1000, 1000);
Gl.glClearColor(0f, 0f, 0.8f, 0);
Gl.glMatrixMode(Gl.GL_MODELVIEW);
Gl.glLoadIdentity();
}
private void Charge_Graphics()
{
Graph.GraphPane.Chart.Fill = new
Fill(Color.FromArgb(240, 240, 240),
Color.FromArgb(250, 250, 250), 100F);
Graph.GraphPane.XAxis.MajorGrid.IsVisible =
true;
Graph.GraphPane.YAxis.MajorGrid.IsVisible =
false;
Graph.GraphPane.XAxis.Scale.Min = 0;
Graph.GraphPane.XAxis.Scale.Max = 10;
Graph.GraphPane.XAxis.Scale.MajorStep = 1;
Graph.GraphPane.YAxis.Scale.Min = 0;
Graph.GraphPane.YAxis.Scale.Max = 5;
Graph.GraphPane.YAxis.Scale.MajorStep = 0.5;
Graph.GraphPane.YAxis.Scale.MinAuto = true;
Graph.GraphPane.YAxis.Scale.MaxAuto = true;
Graph.GraphPane.Title.Text = "Grafica planta";
Graph.GraphPane.XAxis.Title.Text = "Tiempo";
Graph.GraphPane.YAxis.Title.Text = "Amplitud";
Graph.GraphPane.AddCurve("C", new
RollingPointPairList(2000), Color.Green,
SymbolType.VDash);
orden
que
aparece
en
las
tablas
es:
0,01
0,03
0,06
0,10
0,15
0,20
0,26
0,32
0,39
0,46
0,54
0,61
0,69
0,77
0,85
0,93
1,01
1,08
1,16
1,23
1,31
1,37
1,44
1,50
1,57
1,62
1,68
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0,109
0,219
0,328
0,437
0,546
0,655
0,765
0,874
0,983
1,092
1,201
1,311
1,42
1,529
1,638
1,747
1,857
1,966
2,075
2,184
2,294
2,403
2,512
2,621
2,73
2,84
2,949
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
1,73
1,77
1,82
1,86
1,90
1,93
1,96
1,99
2,02
2,04
2,06
2,08
2,10
2,12
2,13
2,14
2,15
2,16
2,17
2,18
2,19
2,19
2,20
2,20
2,21
2,22
2,22
2,23
2,24
2,24
2,25
2,26
2,27
2,28
2,29
2,30
2,31
2,32
2,34
2,35
2,36
2,38
2,39
2,41
2,43
2,45
2,46
2,48
2,50
2,52
2,54
2,56
2,58
2,60
2,63
2,65
2,67
2,69
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
3,058
3,167
3,276
3,386
3,495
3,604
3,713
3,822
3,932
4,041
4,15
4,259
4,368
4,478
4,587
4,696
4,805
4,914
5,024
5,133
5,242
5,351
5,46
5,57
5,679
5,788
5,897
6,006
6,116
6,225
6,334
6,443
6,552
6,662
6,771
6,88
6,989
7,098
7,208
7,317
7,426
7,535
7,644
7,754
7,863
7,972
8,081
8,19
8,3
8,409
8,518
8,627
8,736
8,846
8,955
9,064
9,173
9,282
85
86
87
88
89
90
2,71
2,73
2,76
2,78
2,80
2,82
1
1
1
1
1
1
9,392
9,501
9,61
9,719
9,828
9,938
0,00
0,00
0,01
0,02
0,04
0,06
0,08
0,12
0,16
0,20
0,25
0,30
0,37
0,43
0,50
0,57
0,64
0,72
0,79
0,86
0,93
1,00
1,06
1,11
1,16
1,20
1,24
1,26
1,27
1,28
1,27
1,25
1,22
1,18
1,13
1,07
1,00
0,92
0,82
0,73
0,62
0,51
0,39
0,27
0,15
0,03
-0,09
-0,21
-0,33
0,11
0,22
0,32
0,42
0,52
0,61
0,69
0,77
0,83
0,89
0,93
0,97
0,99
1,00
1,00
0,98
0,96
0,92
0,88
0,82
0,75
0,67
0,59
0,50
0,40
0,30
0,19
0,08
-0,02
-0,13
-0,24
-0,35
-0,45
-0,54
-0,63
-0,71
-0,78
-0,85
-0,90
-0,94
-0,97
-0,99
-1,00
-1,00
-0,98
-0,95
-0,91
-0,86
-0,80
0,109
0,218
0,327
0,436
0,546
0,655
0,764
0,873
0,982
1,092
1,201
1,31
1,419
1,528
1,638
1,747
1,856
1,965
2,074
2,184
2,293
2,402
2,511
2,62
2,73
2,839
2,948
3,057
3,166
3,276
3,385
3,494
3,603
3,712
3,822
3,931
4,04
4,149
4,258
4,368
4,477
4,586
4,695
4,804
4,914
5,023
5,132
5,241
5,35
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
-0,44
-0,55
-0,65
-0,74
-0,82
-0,89
-0,95
-1,00
-1,03
-1,06
-1,06
-1,06
-1,04
-1,00
-0,96
-0,90
-0,83
-0,75
-0,65
-0,55
-0,44
-0,32
-0,20
-0,07
0,06
0,19
0,32
0,45
0,58
0,70
0,82
0,93
1,03
1,12
1,20
1,26
1,32
1,36
1,39
1,40
1,40
1,38
1,35
-0,73
-0,66
-0,57
-0,48
-0,38
-0,27
-0,17
-0,06
0,05
0,16
0,27
0,37
0,47
0,56
0,65
0,73
0,80
0,86
0,91
0,95
0,98
0,99
1,00
0,99
0,97
0,94
0,90
0,85
0,79
0,72
0,64
0,55
0,45
0,35
0,25
0,14
0,03
-0,08
-0,18
-0,29
-0,39
-0,49
-0,58
5,46
5,569
5,678
5,787
5,896
6,006
6,115
6,224
6,333
6,442
6,552
6,661
6,77
6,879
6,988
7,098
7,207
7,316
7,425
7,534
7,644
7,753
7,862
7,971
8,08
8,19
8,299
8,408
8,517
8,626
8,736
8,845
8,954
9,063
9,172
9,282
9,391
9,5
9,609
9,718
9,828
9,937
10,046
La varianza= 105.88
La desviacin estndar=10.29
Datos estadsticos para la entrada seno:
Media: 0.11
La varianza= 0.28
La desviacin estndar=0.53
Se puede observar el gran cambio que se obtiene al
aplicar entradas diferentes a una misma planta.
CONCLUSIONES:
Reconocimos la diferencia entre el desarrollo
terico de una planta contra uno practico para
identificar sus respuestas para su posterior
comparacin
Observamos mediante herramientas estadsticas
las diferencias entre la respuesta de una misma
planta a diferentes entradas.
REFERENCIAS:
Garca Prez Miguel A, Instrumentacin Electrnica,
Editorial Thompson.