Simulation and modeling 2072
Group A
Long Answer Questions:
Attempt
any two questions.
(2x10=20)
AI is thinking...
1. What do you understand by analog method of system simulation? Explain it with suitable example. [3+7]
Analog computers are those computers that are unified with devices like adder and integral so as to simulate the continuous mathematical model of the system, which generates continuous outputs.
Analog method of system simulation is for use of analog computer and other analog devices in the simulation of continuous system. The analog computation is sometimes called differential analyser. Electronics analog computers for simulation are based on the use of high gain dc amplifiers called operational amplifier (op amps). In such analog computer, voltages are equated to mathematical variables and the op amps can add and integrate the voltages. The proper configurations can handle addition of several input voltages each representing the input variables. The analog computer provides limited accuracy because op amps have many assumptions which can never be true in reality.
The general method to apply analog computers for the simulation of continuous system models involves following components:
Example: Automobile Suspension Problem
The general method by which analog computers are applied can be demonstrated using second order differential equation.
M x" + D x' + K x = K F(t)
Solving the equation for the highest order derivate gives,
M x" = K F(t) – D x' - K x
Fig: Automobile suspension problem
Suppose a variable representing the input F(t) is supplied, assume there exist variables representing -x and -x'. These three variables can be scaled and added to produce Mx". Integrating it with a scale factor 1/M produces X'. Changing sign produces -x', further integrating produces -x, a further sign inverter is included to produce +x as output.
AI is thinking...
2. Define physical model. Explain the dynamic physical model with the help of suitable diagrams and expressions. [2+8]
Dynamic Physical Model
- Dynamic physical model is the physical model which describes the time varying relationships of the object properties.
- Such models describes the characteristics of the object that changes over time.
- It rely upon the analogy between the system being studied and some other system of a different nature, but have similarity on forces that directs the behavior of the both systems.
- Eg: A model of wind tunnel, a model of automobile suspension and so on.
To illustrate this type of physical model, consider the two systems shown in following figures i.e. Figure 1 and Figure 2.
Fig1: Mechanical System
Fig2: Electrical system
The Figure 1. represents a mass that is subject to an applied force F(t) varying with time, a spring whose force is proportional to its extension or contraction, and a shock absorber that exerts a damping force proportional to the velocity of the mass.It can be shown that the motion of the system is described by the following differential equation.
Where,
x is the distance moved, M is the mass, K is the stiffness of the spring & D is the damping factor of the shock absorber.
Figure 2. represents an electrical circuit with an inductance L, a resistance R, and a capacitance C, connected in series with a voltage source that varies in time according to the function E(t). If q is the charge on the capacitance, it can be shown that the behavior of the circuit is governed by the following differential equation:
Inspection of these two equations shows that they have exactly the same form and that the following equivalences occur between the quantities in the two systems:
a) Displacement x = Charge q
b) Velocity x’ = Current I, q’
c) Force F = Voltage E
d) Mass M = Inductance L
e) Damping Factor D = Resistance R
f) Spring stiffness K = Inverse of Capacitance 1/C
g) Acceleration x’’ = Rate of change of current q’’
The mechanical system and the electrical system are analogs of each other, and the performance of either can be studied with the other.
AI is thinking...
3. Define frequency test for random numbers. Develop the Poker test for four digit numbers, and use it to test whether a sequence of following 1000-four digit numbers are independent. [2+4+4]
(Use Use α=0.05 and N=4 is 9.49)
Combination(i) |
Observed frequency (Oi) |
Four different digits |
565 |
One pair |
392 |
Two pairs |
17 |
Three like digits |
24 |
Four like digits |
2 |
|
1000 |
Frequency test uses the Kolmogorov-Smirnov or the chi-square test to compare the distribution of the set of numbers generated to a uniform distribution.
The Poker Test is the test for independence based on the frequency with which certain digits are repeated with in a series of numbers. This test not only tests for the randomness of the sequence of numbers, but also the digits comprising of each of the numbers. The expected value of each of the combination of digits in a number is compared with the observed value by means of the chi-square test for independence. The acceptance is done if the observed value of chi-square sums for all the possible combinations of digits is less than the acceptable value for the given degree of freedom at the specified confidence interval.
Poker test for four digit numbers
In four digit number, there are five different possibilities
- All individual digits can be different
- There can be one pair of like digit
- There can be two pair of like digits
- There can be three digits of a kind
- There can be four digits of a kind
The probabilities associated with each of the possibilities is given by
P (four different digits) = 4C4 * (10/10) * (9/10) * (8/10) * (7/10) = 0.504
P (one pair) = 4C2 * (10/10) * (1/10) * (9/10) * (8/10) = 0.432
P (two pair) = (4C2/2)*(10/10) * (1/10) * (9/10) * (1/10) = 0.027
P (three digits of a kind) = 4C3 * (10/10) * (1/10) * (1/10) * (9/10) = 0.036
P (four digits of a kind) = 4C4 * (10/10) * (1/10) * (1/10) * (1/10) = 0.001
Now the calculation table for the Chi-square statistics is:
Combination(i) | Observed Frequency(Oi) | Expected Frequency(Ei) | (Oi-Ei) | (Oi-Ei)2/Ei |
Four different digits | 565 | 0.504*1000 = 504 | 61 | 7.383 |
One pair | 392 | 0.432*1000 = 432 | -40 | 3.704 |
Two pair | 17 | 0.027*1000 = 27 | -10 | 3.704 |
Three digits of a kind | 24 | 0.036*1000 = 36 | -12 | 4.000 |
Four digits of a kind | 2 | 0.001*1000 = 1 | 1 | 1 |
1000 | 1000 | Σ(Oi-Ei)2/Ei = 19.791 |
= 19.791
and Given α, N =
0.05, 4= 9.49
Here the calculated value of chi-square is 19.791 which is greater than the given tabulated value of chi- square so we reject the null hypothesis of independence between given numbers.
AI is thinking...
Group B
Short answer Questions:
Attempt
any eight questions. (5x8=40)
AI is thinking...
4. Verification is concerned with building the “model right” and validation is concerned with building the “right model”. Justify it with suitable reasons.
Verification is the process of determining that a model implementation and its associated data accurately represent the developer's conceptual description and specifications. Verification answers the question "Have we built the model right?". The verification focuses on comparing the elements of a simulation model of the system with the description of what the requirements and capabilities of the model were to be. Verification is an iterative process aimed at determining whether the product of each step in the development of the simulation model fulfills all the requirements levied on it by the previous step and is internally complete, consistent, and correct enough to support the next phase.
Validation is the process of determining the degree to which a simulation model and its associated data are an accurate representation of the real world from the perspective of the intended uses of the model. Validation answers the question "Have we built the right model?”. The validation focuses on the agreement between the observed behavior of elements of a system with the corresponding elements of a simulation model of the system and on determining whether the differences are acceptable given the intended use of the model. If a satisfactory agreement is not obtained, the model is adjusted to bring it in closer agreement with the observed behavior of the actual system (or errors in observation/experimentation or reference models/analyses are identified and rectified).
AI is thinking...
5. How do you use estimation method in the analysis of simulation output? Explain in brief.
AI is thinking...
6. Explain any four program control statements that are used in GPSS.
GPSS (General Purpose Simulation System) is a highly structured and special purpose simulation language based on process interaction approach and oriented toward queuing systems.
- The system being simulated is described by the block diagram using various GPSS blocks.
- Each block represents events, delays or other actions that affect the transaction flow.
- GPSS model is developed by converting the block diagram into block statements and adding the control statements.
Any four Program control statements that are used in GPSS are:
1. CLEAR: A CLEAR Command returns the simulation to the unused state.
CLEAR A
Operand:
A - ON or OFF. If the A Operand is omitted, ON is assumed. Optional. The operand must be ON, OFF or Null.
2. END: The END Control Statement has been replaced by EXIT, which can terminate a Session. END is now a keyword in the PLUS Language.
3. RESET: A RESET Command marks the beginning of a measurement period.
RESET
Operands: None.
4. START: A START Command begins a simulation.
START A,B,C,D
Operands:
A - Termination count. Required. The operand must be PosInteger.
B - Printout operand. NP for “no printout”. Default is to print a standard report. Optional. The operand must be NP or Null.
C - Not used. Kept for compatibility with older dialects of GPSS.
D - Chain printout. 1 to include the CEC and FEC in the standard report. Optional. The operand must be Null, or PosInteger.
AI is thinking...
7. Describe the rejection method of generating the random numbers.
The rejection method for obtaining samples of random numbers forms a given non-uniform distribution works by generating uniform random numbers repeatedly and accepting only those numbers that meet certain conditions.
The rejection method is applied when the probability density function, f(x), has a lower and upper limit to its range, 'a' and 'b', respectively, and an upper bound 'c'. The method can be specified as follows:
1. Find the maximum value c of f(x) on a ≤ x ≤ b.
f(X) ≤ c ∀ x ∈ [a, b]
2. Compute two values μ1, μ2 of the uniformity distributed variables, both defined on [a, b] = [0, 1].
3. Compute x0 = a + μ1(b - a)
4. Compute y0 = c μ2
5. If y0 ≤ f(x0), accept x0 as desired output; otherwise reject x0 and repeat the process with two next values μ1 & μ2.
AI is thinking...
8. Define queuing discipline. Describe different types of queuing disciplines with example.
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
- First in first out :This principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.
- Last in first out : This principle also serves customers one at a time, however the customer with the shortest waiting time will be served first.
- Service in random order: A customer is picked up randomly from the waiting queue for service.
- Shortest job first: The next job to be served is the one with the smallest size (shortest service time).
- Priority: Customers with high priority are served first.
AI is thinking...
9. How do you eliminate the effect of transient and initial bias in simulation output?
There are two general approaches that can be used to remove the initial bias:
1. The system can be started in more representative states rather than in the empty state.
2. The first part of the simulation run can be ignored.
In the first approach, it is necessary to know the steady-state distinction for the system and we then select the initial state distinction. In the study of simulation, particularly the existing system, there may be information available on the expected condition which makes it feasible to select a better initial condition and thus eliminating the initial bias.
The second approach that is used to remove the initial bias is the most common approach. In this method, the initial section of the run which has a high bias (simulation) result is eliminated.
First, the run is started from an idle state and stopped after certain period of time (The time at which the bias is satisfactory). The entities existing in the system at that are left as they are and this point is the point of a restart for other repeating simulation runs. Then the run is restarted with statistics being gathered from the point of the restart.
AI is thinking...
10. Differentiate between clock time and simulation time used in system simulation.
Clock Time | Simulation Time |
It is the total amount of time for which the CPU remains active. | It is the total amount of time that CPU spends for simulation. |
Clock time is measured continuously through all the operations that a CPU undergoes. | Simulation time only deals with the amount of time eleavated for simulation. |
It is usually more. | It is usually less. |
Let us take an example, where CPU is running for 6 seconds and now it performs a calculation for 0.01 second and stops the calculation, again the CPU runs for 5 more seconds.
So, Clock time= total time CPU is active =6+5 secs = 11 seconds
Simulation time = Time taken by CPU to perform calculation = 0.01 seconds
AI is thinking...
11. Describe the distributed lag model with the help of any practical example.
Models that have the property of changing only at fixed interval of time is called distributed lag model. It is used to predict current values of a dependent variable based on both the current values of an explanatory variable (independent variable) and the lagged (past period) values of this explanatory variable.
This model consists of linear algebraic equations that represent continuous system but data are available at fixed points in time.
For example: Mathematical model of national economy
Let
C = consumption
I = investment
T = Taxes
G = government expenditures
Y = national income
Then
C=20+0.7(Y-T)
I=2+0.1Y
T=0.2Y
Y=C+I+G
All the equation are expressed in billions of rupees. This is static model and can be made dynamic by lagging all the variables as follows
C=20+0.7(Y-1-T-1)
I=2+0.1Y-1
T=0.2Y-1
Y=C-1+I-1+G-1
Any variable that can be expressed in the form of its current value and one or more previous value is called lagging variable. And hence this model is given the name distributed lag model. The variable in a previous interval is denoted by attaching –n suffix to the variable. Where –n indicate the nth interval.
AI is thinking...
12. Identify, with reasons, four different problems from your own experience that you think should be solved using digital simulation rather than analytically.
AI is thinking...
13. Write short notes on:
a. Markov
Chain
b. Feedback
system
a. Markov Chain
If the future states of a process are independent of the past and depend only on the present , the process is called a Markov process. A discrete state Markov process is called a Markov chain. A Markov Chain is a random process with the property that the next state depends only on the current state.
Markov chains are used to analyze trends and predict the future. (Weather, stock market, genetics, product success, etc.
b. Feedback system
The system takes feedback from the output i.e. input is coupled with output. A significant factor in the performance of many systems is that coupling occurs between the input and output of the system. The term feedback is used to describe the phenomenon.
One example of feedback system in which there is continuous control is the aircraft system. Here the input is a desired aircraft heading and the output is the actual heading. The gyroscope of the autopilot is able to detect the difference between the two headings. A feedback is established by using the difference to operate the control surface. Since change of heading will then affect the signal being used to control the heading.
The difference between the desired signal θt and actual heading θ0 is called the error signal, since it is a measure of the extent to which the system from the desired condition. It is denoted by є.
We also know that, in terms of angular acceleration
From equation (1), (2) & (3)
Dividing both sides by I, and making the following substitutions in equation (4)
(where
is damping factor)
This is a second order differential equation.
AI is thinking...