Sie sind auf Seite 1von 18

Lund University

EIEN50 – Automation
Simulation 1

Aamer Siddiqui
Contents
Task 2 ............................................................................................................................................................ 3
2.1 ............................................................................................................................................................. 3
2.2 ............................................................................................................................................................. 3
2.3 ............................................................................................................................................................. 4
2.4 ............................................................................................................................................................. 5
2.5 ............................................................................................................................................................. 5
2.6 ............................................................................................................................................................. 7
2.7 ............................................................................................................................................................. 8
2.8 ........................................................................................................................................................... 10
2.9 ........................................................................................................................................................... 10
3.1 ........................................................................................................................................................... 11
3.2 ........................................................................................................................................................... 12
3.3 ........................................................................................................................................................... 13
3.4 ........................................................................................................................................................... 14
3.5 ........................................................................................................................................................... 15
3.6 ........................................................................................................................................................... 15
3.7 ........................................................................................................................................................... 15
3.8 ........................................................................................................................................................... 16
3.9 ........................................................................................................................................................... 17
3.10 ......................................................................................................................................................... 18
3.11 ......................................................................................................................................................... 18
3.12 ......................................................................................................................................................... 18

Figure 1. A [100] B [010] C [001] ................................................................................................................ 4


Figure 2. 6.3d A [100] B[010] ...................................................................................................................... 5
Figure 3. 6.3f A[100] B[010] ........................................................................................................................ 5
Figure 4. 6.3g A[110] B[111] ....................................................................................................................... 5
Figure 5. 6.3e A[1111] B [1110]................................................................................................................... 5
Figure 6. 6x6 Function ................................................................................................................................ 10
Figure 7. State Graph .................................................................................................................................. 11
Figure 8. A1 for [1000] & [1010] ............................................................................................................... 12
Figure 9. A2 for [1000] & [1010] ............................................................................................................... 13
Figure 10. A1 .............................................................................................................................................. 15
Task 2
2.1

2.2
It is ergodic when 1) Unaffected of the initial condition 2) Congregates at a steady state solution

Its eigenvalues have to lie within the unit circle.


The Eigen values are found as follows
Therefore, these eigen values lie inside the Unit circle and hence it is Ergodic.

2.3

Figure 1. A [100] B [010] C [001]

It can be observed from fig.1 that irrespective of the initial condition, the plot always converges at a point
and hence it is ergodic.
2.4

Figure 2. 6.3d A [100] B[010]


Figure 4. 6.3g A[110] B[111]

Figure 3. 6.3f A[100] B[010]


Figure 5. 6.3e A[1111] B [1110]

2.5

Matrix Ergodic Eigen Values IC1


6.3 D No 0.30 1.00 -1.00
6.3 E No 1.0 0.2 1.0 1.0
6.3 F YES -0.8 1.0 0.5
6.3 G No 0.48 0.79 1.0
It is observed that 6.3 D has one eigenvalue that is 1 and the rest are within the circle whereas -1 is on the
boundary. Although it is also visible from the Fig 2 that, it oscillates along the points and does not
converge hence it is not ergodic.
In the case of 6.3 E its is observed that all the eigen values lie in the unit circle, although there are more
than 1 point that lies on its boundary. Therefore, it is not ergodic. This is also evident from the Fig 5. And
from figure 5 that the S1 and S3 both possess a probability of 1.
6.3 F is observed to have all its eigen values that fall under the unit circle and hence it is possible that it
can be Ergodic. This can be verified if we can locate the stationary points using the following

Solving this equation produces the following stationary points.

Since x, y , z are positive real integers and x<1 & y<1 & z<1 and x+y+z=1
Hence it is verified that it is Ergodic.

In the case of 6.3g although all the eigen values lie inside the unity circle, it does not seem to converge
as seen in the graph, but this can be verified through the following principal.
Solving the linear eqution provides the following results

Since x, y , z are positive real integers and x<1 & y<1 & z<1 and x+y+z=1
Hence it is verified that it is Ergodic.

2.6

For 6.3d It can be said that it is a ergodic function, although since f=1, it can be said that the function can
be recurrent and periodic between state 1 and 3

For 6.3f It can be commented that the function is ergodic since it is non periodic.
For fig 6.3g it is evident that since P11= 1, It would be a trappin state. And the system is not ergodic

In the case of Fig 6.3f It is evident that states 1 & 3 are trapping where as the function as a whole is not
ergodic.

2.7
Matrix Ergodic Eigen Values IC1
6.3 D No 0.30 1.00 -1.00
6.3 E YES 1.0 0.2 1.0 1.0
6.3 F YES -0.8 1.0 0.5
6.3 G No 0.48 0.79 1.0

It is evident that 1 is present in all eigen values and is present because of the following derivation
Hence 1 is observed in all cases.
2.8

Figure 6. 6x6 Function

Therefore, it is evident from the plot that it does not converge at some point but is periodically oscillating.

2.9
The plot shows the markov chain with 6 states and it is evident that 5 and 6 both connect to state 1 and 4
connects both 6 and 5.

3.1

Figure 7. State Graph


3.2
Assuming P(0) = [1000] & [1010]

Figure 8. A1 for [1000] & [1010]


Figure 9. A2 for [1000] & [1010]

3.3

It can be seen from the plot that all the values converge at some stationary points. It can also be verified
by finding the eigen values of A1 & A2.
The Eigen values of A1 are as follows 0, -0.35, -7, -0.35 Therefore, it lies on the left side of the complex
graph and hence is ergodic.
The Eigen Values of A2 are as follows 0, -1.15, -0.6, -0.55 are on the left side of the complex graph and
hence are ergodic
3.4
Figure 10. A1

Therefore, comparing with MatLAB values produces almost similar results.

3.5
Adding the MatLAB code Sum(x,2); provides the addition of the row and hence it is proved that all the
elements of p(t) sum to 1.

3.6
The Eigen values of A1 are as follows 0, -0.35, -0.7, -0.35 Therefore, it lies on the left side of the
complex graph and hence is ergodic.

3.7

The system has 8 states as each element can be present in a total of 2 states and there are 3 elements.
Hence 8 states are present.
3.8
P(0)= [1 0 0 0 0 0 0 0 ]
The condition for both machines operation and an empty buffer would be S110.

3.9
Stationary vector from MatLAB = [0.1120 0.2063 0.0463 0.1844 0.0710 0.022 0.2151
0.1424].
The condition for both machines operation and an empty buffer would be S110.
3.10

From the State graph it is evident that when machine 1 is in production at [010] and at [011], It is also
evident that for machine 2 it occurs at [ 101] & [111].

3.11
Machine 2 is starved when buffer is empty and its unbroken.
Therefore, the probability is as follows [001] + [011] = 0.2063 + 0.184 = 0.39

3.12
Machine one is blocked when its unbroken and the buffer is full
Therefore, the probability is as follows [111] + [110] = 0.2151 + 0.1424 = 0.3575

Das könnte Ihnen auch gefallen