[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] some problem about two-state Markov model channel



Hi, everyone,
   I am a new user of ns-2, I have some problem in simulating Markov model. The question is like this.,
I want to simulate the wireless channel as a two-state Markov model, the bandwidth of wireless channel is 1.5Mbps, the packet size is 1400byte, so the transmission of a packet is about  7.8ms. The two state of the Markov model is a good state with packet error rate is 0 and a bad state with packet error rate is 1, the transition probability of good state to bad state is 0.12, the transition probability of bad state to good state is 0.23, so the transition probability of good state to good state is 0.88, the transition probability of bad state to bad state is 0.77, the corresponding tcl programme is following,
set good [new ErrorModel/Uniform 0 packet]
set bad [newErrorModel/Uniform 1 packet]
set m_states [list $good $bad]
set m_periods [list 7.8ms 7.8ms]
set m_transmx {{0.88 0.12} {0.23 0.77}}
set m_trunit pkt
set m_sttype time
set m_nstates 2
set m_nstart [lindex $m_states 0]
set em [new ErrorModel/MultiState $m_states $m_periods $m_transmx $m_trunit $m_sttype $m_nstart]


But the simulation result is different with the theory result, who can tell me what is the reason?
thanks for your help very much!