Professional Documents
Culture Documents
2. Results
2.2. Determining α
2.5
2
ans =
47791 1
1.5 >> x = [1:47791]' ;
1
>> polyfit(x,y,1)
ans =
0.5
-0.0001 4.6055
0
0 0.5 1 1.5 2 2.5
t (seconds) 4
So for tank 2, our α = .0001;
x 10
4.5
β is actually the rate at which it fills. So we will isolate
4 this part of the equation by just filling and taking the data
3.5 of x(t) and t. Again we follow the directions in the
3 handout produce (Figure 12 and 13) the x(t) vs t graphs
x(t) (volts)
2.5
by saving the data to Matlab.
2
1.5
To estimate α our group used the “polyfit” command
in Matlab. When importing data from either the tank 1 1
>> polyfit(x,y,1)
Tank 2 Fill (x(t) vs t)
2.3. Open Loop Controller
3
1.5
1
OL Tank 1 Steady Response (level 10)
7
0.5
6
0 5
0 2000 4000 6000 8000 10000 12000
t
4
v (volts)
Figure 13: Tank 2 Fill Graph
3
1
2
X: 3.666e+004
Y: 0.9851
0.8 1.8
0.6 1.6
x(t) volts
x(t) volts
0.4 1.4
1.2
0.2
1
0
0.8
-0.2
0 1 2 3 4 5 6 7 8
t (time) 4 0 1 2 3 4 5 6
x 10
t (time) 4
x 10
Figure 15: Proportional Feedback Steady State
Figure 17: Tank 1 after adding water in steady state
The steady state level voltage did not change if we
started with water in the tank at level 5 (Figure 16). We found that the level does change if you change the
orifice because the amount draining from the tank
increases or decreases (Figure 18).
Tank 1 start level at 5
1.12
1.4
1.08
1.2
1.06
x(t) volts
1.04 0.8
x(t) volts
0.6
1.02
0.4
1
0.2
0.98
0 0.5 1 1.5 2 2.5 3 0
t (time) 4
x 10
-0.2
0 1 2 3 4 5 6
Figure 16: Steady state after starting at level 5 t (time) 4
x 10
1.6 1.5
1.4
1.2 1
x(t) volts
1
x(t) volts
0.8 0.5
0.6
0.4 0
0.2
0 -0.5
0 1000 2000 3000 4000 5000 6000
-0.2 t (time)
0 0.5 1 1.5 2 2.5 3 3.5
t (time) 4
x 10 Figure 21.1: Tank Signal into Scope. ki = 0.1 kp =5.07
Figure 19: Tank 1 after changing k
Tank Error Signal
2.5
0.5
1.5
1
x(t) volts
-0.5
0 1000 2000 3000 4000 5000 6000
t (time)
0.5
Figure 21.2: Tank Error Signal. ki = 0.1 kp = 5.07
0
6
We used a step size of 1.972V and kp was 5.07 and ki
was 0.1. The output, error, and control signal from the
4
amplifier are Figures 21.1, 21.2, 21.3 respectively. For the
rest of this section, this will be the order and assignment
2
for different values of ki and kp.
0
0 1000 2000 3000 4000 5000 6000
t (time)
2.5
2.5
2 2
x(t) volts
1.5 1.5
x(t) volts
1
1
0.5
0.5
0
0
-0.5
0 1000 2000 3000 4000 5000 6000 7000 8000
-0.5 t (time)
0 1000 2000 3000 4000 5000 6000 7000 8000
t (time)
Figure 23.1: Tank Output Signal. ki = 1 kp = 5.07
Figure 22.1: Tank Output Signal. ki = .5 kp = 5.07
2
2
1.5
1.5
1
x(t) volts
1
x(t) volts
0.5
0.5 0
0 -0.5
-1
-0.5
-1.5
-1 0 1000 2000 3000 4000 5000 6000 7000 8000
0 1000 2000 3000 4000 5000 6000 7000 8000 t (time)
t (time)
Figure 23.2: Tank Error Signal. ki = 1 kp = 5.07
Figure 22.2: Tank Error Signal. ki = .5 kp =5.07
20
1.5
1
15
x(t) volts
x(t) volts
0.5
10 0
-0.5
5
-1
0 -1.5
0 1000 2000 3000 4000 5000 6000 7000 8000 0 1000 2000 3000 4000 5000 6000 7000 8000
t (time) t (time)
Figure 22.3: Tank Control Signal. ki = .5 kp =5.07 Figure 23.3: Tank Control Signal. ki = 1 kp = 5.07
Then we kept the value of ki at .5 and changed the
Tank Output Signal
value of kp with the values 10,2,and 20 (Figs. 24,25,26). 3
2.5
Tank Output Signal
3.5
2
3
1.5
x(t) volts
2.5
1
2
x(t) volts
0.5
1.5
1 0
0.5 -0.5
0 1000 2000 3000 4000 5000 6000 7000 8000
t (time)
0
Figure 25.1: Tank Output Signal. ki = 0.5 kp = 2
-0.5
0 1000 2000 3000 4000 5000 6000 7000
t (time)
Tank Error Signal
Figure 24.1: Tank Output Signal. ki = 0.5 kp = 10 2.5
2
Tank Error Signal
2.5
1.5
2
1
x(t) volts
1.5
0.5
1
x(t) volts
0
0.5
0 -0.5
-0.5 -1
0 1000 2000 3000 4000 5000 6000 7000 8000
t (time)
-1
Figure 25.2: Tank Error Signal. ki = 0.5 kp =2
-1.5
0 1000 2000 3000 4000 5000 6000 7000
t (time)
40
8
35
x(t) volts
30 6
x(t) volts
25
4
20
15 2
10
0
0 1000 2000 3000 4000 5000 6000 7000 8000
5
t (time)
0
0 1000 2000 3000 4000 5000 6000 7000 Figure 25.3: Tank Control Signal. ki = 0.5 kp = 2
t (time)
1.5
0.5
-0.5
0 500 1000 1500 2000 2500 3000
t (time)
3500 4000 4500 5000 where and ;
-1.5
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Tank Response
t (time) 1.8
1.4
step
1.2
0.8
80
0.6
70
0.4
60
0.2
50
x(t) volts
40 -0.2
0 2 4 6 8 10 12 14
t (time) 4
30 x 10
20
Figure 27: Tank Response (10 to 11)
10
0
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
t (time)
6.2V, 5.5V, and 5.3V (Fig. 28, 29, and 30). 1.4
1.2 step
1
Tank Response
2
0.8
x(t) volts
0.6
1.5
0.4
step
0.2
1
x(t) volts
0.5 -0.2
0 2 4 6 8 10 12 14
t (time) 4
x 10
0
Figure 30: Tank Step Response (10 to 8)
-0.5
0 5 10 15
t (time) 4
x 10
Figure 28: Tank Step Response ( 10 to 12) The second test for linearity required the input of the
controller to be sinusoidal instead of the step:
1.6
Tank Response The value that we used for Vpss was 5.7V, A was 1,
and w = 0.3 (Fig. 31) .
1.4
1.2 step
1.6
0.6
1.4
0.4 1.2
0.2 1
x(t) volts
0 0.8
-0.2 0.6
0 2 4 6 8 10 12 14
t (time) 4 0.4
x 10
-0.2
0 2 4 6 8 10 12 14
t (time) 4
x 10
1
x(t) volts
Tank Response w = 10
0.8 1.8
0.6 1.6
0.4 1.4
0.2 1.2
0 1
x(t) volts
-0.2 0.8
0 1 2 3 4 5 6 7 8 9
t (time) 4
0.6
x 10
0.2
Tank Response w = 2
-0.2
1.8 0 1 2 3 4 5 6 7 8
t (time) 4
x 10
1.6
1.4
Figure 35: Tank Steady State. w = 10 A =1
1.2
Tank Response w =0.3
1 1.6
x(t) volts
0.8
1.4
0.6
1.2
0.4
1
0.2
0.8
x(t) volts
0
0.6
-0.2
0 1 2 3 4 5 6 7 8 9 10
t (time) 4 0.4
x 10
-0.2
0 1 2 3 4 5 6 7 8
Tank Response w = 5
t (time) 4
1.8 x 10
1.2
As we increased ω the water tank reached the steady
1 state response more quickly. Without the other two
x(t) volts
0.8 methods one could simply see that Y(t) was not a perfect
0.6 sinusoid. We have a few reasons for this error:
0.4 • signal noise
0.2 • not perfect steady flow from water pump
0 • a sinusoidal signal pump liquid cannot be
-0.2
perfect
0 1 2 3 4 5 6 7 8 9
t (time) 4
x 10
the water level in the lower tank hold a steady-state level 1.45
of 10 shown in Figures 37, 38, and 39 respectively.
1.4
x(t) volts
1.35
For our open-loop controller we used a step = 2.7v and
delay of 1 second: 1.3
1.25
0.6
0.4 3. Conclusions
0.2
-0.5
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
t (time)