Commit 0bff5368 authored by Zeljko Tabakovic's avatar Zeljko Tabakovic Committed by Stephan Korsholm
Browse files

#153 ofdma ul imt ul interference power isi

Showing with 44 additions and 4 deletions
+44 -4
package org.seamcat.model.systems.imt2020uplink.simulation; package org.seamcat.model.systems.imt2020uplink.simulation;
import static org.seamcat.model.plugin.system.StandardResults.FREQUENCY_ALL;
import static org.seamcat.model.systems.imt2020uplink.IMT2020UpLinkSystemPlugin.*;
import java.util.*;
import org.seamcat.model.distributions.GaussianDistribution; import org.seamcat.model.distributions.GaussianDistribution;
import org.seamcat.model.factory.Factory; import org.seamcat.model.factory.Factory;
import org.seamcat.model.mathematics.Mathematics; import org.seamcat.model.mathematics.Mathematics;
...@@ -11,6 +7,11 @@ import org.seamcat.model.simulation.result.*; ...@@ -11,6 +7,11 @@ import org.seamcat.model.simulation.result.*;
import org.seamcat.model.systems.generic.ui.PathLossCorrelationUI; import org.seamcat.model.systems.generic.ui.PathLossCorrelationUI;
import org.seamcat.model.types.Unit; import org.seamcat.model.types.Unit;
import java.util.*;
import static org.seamcat.model.plugin.system.StandardResults.FREQUENCY_ALL;
import static org.seamcat.model.systems.imt2020uplink.IMT2020UpLinkSystemPlugin.*;
class IMT2020UpLinkCalculations { class IMT2020UpLinkCalculations {
public static final VectorDef BIT_RATE_ACHIEVED_ALL = iv(ValueName.BITRATE_ACHIEVED_ALL, Unit.kbps); public static final VectorDef BIT_RATE_ACHIEVED_ALL = iv(ValueName.BITRATE_ACHIEVED_ALL, Unit.kbps);
public static final VectorDef RECEIVED_POWER_ALL = iv(ValueName.RECEIVED_POWER_ALL, Unit.dBm); public static final VectorDef RECEIVED_POWER_ALL = iv(ValueName.RECEIVED_POWER_ALL, Unit.dBm);
...@@ -186,12 +187,17 @@ class IMT2020UpLinkCalculations { ...@@ -186,12 +187,17 @@ class IMT2020UpLinkCalculations {
vi.calculateAchievedBitrate(); vi.calculateAchievedBitrate();
double ach = vi.getAchievedBitrate(); double ach = vi.getAchievedBitrate();
totalBitrate += ach; totalBitrate += ach;
vCollector.sample(INTER_SYSTEM_INTERFERENCE_ALL, vi.getInterSystemInterference());
vCollector.sample(INTERFERENCE_POWER_ALL, vi.getInterferencePower());
if (vi.isConnectedToReferenceCell()) { if (vi.isConnectedToReferenceCell()) {
sinrRefCellSum += sinr; sinrRefCellSum += sinr;
refCellCount++; refCellCount++;
refCellBitrate += ach; refCellBitrate += ach;
dRSS += Mathematics.dB2Linear(vi.getReceivePower()); dRSS += Mathematics.dB2Linear(vi.getReceivePower());
ISI += vi.getTotalInterferenceWatt(); ISI += vi.getTotalInterferenceWatt();
vCollector.sample(INTER_SYSTEM_INTERFERENCE, vi.getInterSystemInterference());
vCollector.sample(INTERFERENCE_POWER, vi.getInterferencePower());
} }
sinrSum += sinr; sinrSum += sinr;
} }
......
...@@ -11,6 +11,8 @@ public class VictimImpl extends DefaultVictimImpl { ...@@ -11,6 +11,8 @@ public class VictimImpl extends DefaultVictimImpl {
private Link connection; private Link connection;
private double achievedSINR; private double achievedSINR;
private double achievedBitrate; private double achievedBitrate;
private double interSystemInterference;
private double interferencePower;
public VictimImpl(Link connection) { public VictimImpl(Link connection) {
super(connection.getLinkResult()); super(connection.getLinkResult());
...@@ -34,6 +36,9 @@ public class VictimImpl extends DefaultVictimImpl { ...@@ -34,6 +36,9 @@ public class VictimImpl extends DefaultVictimImpl {
double extIntWatt = Mathematics.fromdBm2Watt(getTotalInterferenceBlocking()) double extIntWatt = Mathematics.fromdBm2Watt(getTotalInterferenceBlocking())
+ Mathematics.fromdBm2Watt(getTotalInterferenceUnwanted()); + Mathematics.fromdBm2Watt(getTotalInterferenceUnwanted());
interferencePower = Mathematics.fromWatt2dBm(totalInterferenceWatt + extIntWatt);
interSystemInterference = Mathematics.fromWatt2dBm(totalInterferenceWatt);
double v = rPowerWatt / (totalInterferenceWatt + extIntWatt); double v = rPowerWatt / (totalInterferenceWatt + extIntWatt);
achievedSINR = Mathematics.linear2dB(v); achievedSINR = Mathematics.linear2dB(v);
} }
...@@ -54,6 +59,11 @@ public class VictimImpl extends DefaultVictimImpl { ...@@ -54,6 +59,11 @@ public class VictimImpl extends DefaultVictimImpl {
public double getTotalInterferenceWatt() { public double getTotalInterferenceWatt() {
return connection.getUserTerminal().getTotalInterferenceWatt(); return connection.getUserTerminal().getTotalInterferenceWatt();
} }
public double getInterferencePower() {
return interferencePower;
}
public double getAchievedSINR() { public double getAchievedSINR() {
return achievedSINR; return achievedSINR;
} }
...@@ -74,6 +84,8 @@ public class VictimImpl extends DefaultVictimImpl { ...@@ -74,6 +84,8 @@ public class VictimImpl extends DefaultVictimImpl {
return connection.getUserTerminal().getFrequency(); return connection.getUserTerminal().getFrequency();
} }
public double getInterSystemInterference() {return interSystemInterference;}
@Override @Override
public boolean isSameRx(SystemLink other) { public boolean isSameRx(SystemLink other) {
if (other instanceof VictimImpl) { if (other instanceof VictimImpl) {
......
...@@ -67,6 +67,7 @@ public class OFDMAUpLinkSystemPlugin implements SystemPlugin<SystemModelOFDMAUpL ...@@ -67,6 +67,7 @@ public class OFDMAUpLinkSystemPlugin implements SystemPlugin<SystemModelOFDMAUpL
public VectorDef SINR_REF; public VectorDef SINR_REF;
public VectorDef FREQUENCY, CURRENT_TRANSMIT_POWER, EFFECTIVE_PATH_LOSS, PATH_LOSS; public VectorDef FREQUENCY, CURRENT_TRANSMIT_POWER, EFFECTIVE_PATH_LOSS, PATH_LOSS;
public VectorDef SINR_ACHIEVED, BIT_RATE_ACHIEVED, RECEIVED_POWER; public VectorDef SINR_ACHIEVED, BIT_RATE_ACHIEVED, RECEIVED_POWER;
public VectorDef INTERFERENCE_POWER, INTER_SYSTEM_INTERFERENCE;
private RadioSystem victim; private RadioSystem victim;
private RadioSystem interferer; private RadioSystem interferer;
...@@ -255,6 +256,8 @@ public class OFDMAUpLinkSystemPlugin implements SystemPlugin<SystemModelOFDMAUpL ...@@ -255,6 +256,8 @@ public class OFDMAUpLinkSystemPlugin implements SystemPlugin<SystemModelOFDMAUpL
SINR_ACHIEVED = iv(ValueName.SINR_ACHIEVED, Unit.dB); SINR_ACHIEVED = iv(ValueName.SINR_ACHIEVED, Unit.dB);
BIT_RATE_ACHIEVED = iv(ValueName.BITRATE_ACHIEVED, Unit.kbps); BIT_RATE_ACHIEVED = iv(ValueName.BITRATE_ACHIEVED, Unit.kbps);
RECEIVED_POWER = iv(ValueName.RECEIVED_POWER, Unit.dBm); RECEIVED_POWER = iv(ValueName.RECEIVED_POWER, Unit.dBm);
INTERFERENCE_POWER=iv(ValueName.INTERFERENCE_POWER, Unit.dBm);
INTER_SYSTEM_INTERFERENCE=iv(ValueName.INTER_SYSTEM_INTERFERENCE, Unit.dBm);
INITIAL_VICTIM_OUTAGE = v(ValueName.NON_INTERFERED_BITRATE, Unit.kbps); INITIAL_VICTIM_OUTAGE = v(ValueName.NON_INTERFERED_BITRATE, Unit.kbps);
INTERFERED_BIT_RATE_REF = v(ValueName.INTERFERED_BITRATE, Unit.kbps); INTERFERED_BIT_RATE_REF = v(ValueName.INTERFERED_BITRATE, Unit.kbps);
......
...@@ -200,6 +200,8 @@ public class OFDMAUpLinkSimulation implements SimulationInstance { ...@@ -200,6 +200,8 @@ public class OFDMAUpLinkSimulation implements SimulationInstance {
double ach = vi.getAchievedBitrate(); double ach = vi.getAchievedBitrate();
vCollector.sample(BIT_RATE_ACHIEVED_ALL, ach); vCollector.sample(BIT_RATE_ACHIEVED_ALL, ach);
totalBitrate += ach; totalBitrate += ach;
vCollector.sample(INTERFERENCE_POWER_ALL, vi.getInterferencePower() );
vCollector.sample(INTER_SYSTEM_INTERFERENCE_ALL, vi.getInterSystemInterference());
if (vi.isConnectedToReferenceCell()) { if (vi.isConnectedToReferenceCell()) {
sinrRefCellSum += sinr; sinrRefCellSum += sinr;
refCellCount++; refCellCount++;
...@@ -208,6 +210,8 @@ public class OFDMAUpLinkSimulation implements SimulationInstance { ...@@ -208,6 +210,8 @@ public class OFDMAUpLinkSimulation implements SimulationInstance {
ISI += vi.getTotalInterferenceWatt(); ISI += vi.getTotalInterferenceWatt();
vCollector.sample(plugin.BIT_RATE_ACHIEVED, ach); vCollector.sample(plugin.BIT_RATE_ACHIEVED, ach);
vCollector.sample(plugin.SINR_ACHIEVED, Mathematics.linear2dB(sinr)); vCollector.sample(plugin.SINR_ACHIEVED, Mathematics.linear2dB(sinr));
vCollector.sample(plugin.INTERFERENCE_POWER, vi.getInterferencePower() );
vCollector.sample(plugin.INTER_SYSTEM_INTERFERENCE, vi.getInterSystemInterference());
} }
sinrSum += sinr; sinrSum += sinr;
} }
......
...@@ -8,6 +8,9 @@ public class VictimImpl extends DefaultVictimImpl { ...@@ -8,6 +8,9 @@ public class VictimImpl extends DefaultVictimImpl {
private Link connection; private Link connection;
private double achievedSINR; private double achievedSINR;
private double achievedBitrate; private double achievedBitrate;
private double receivePower;
private double interferencePower;
private double interSystemInterference;
public VictimImpl(Link connection) { public VictimImpl(Link connection) {
super(connection.getLinkResult()); super(connection.getLinkResult());
...@@ -41,11 +44,15 @@ public class VictimImpl extends DefaultVictimImpl { ...@@ -41,11 +44,15 @@ public class VictimImpl extends DefaultVictimImpl {
public void calculateAchievedSINRWatt() { public void calculateAchievedSINRWatt() {
double rPowerWatt = double rPowerWatt =
Mathematics.fromdBm2Watt(connection.getUserTerminal().getServingLink().getCurrentReceivePower()); Mathematics.fromdBm2Watt(connection.getUserTerminal().getServingLink().getCurrentReceivePower());
receivePower = Mathematics.fromWatt2dBm(rPowerWatt);
double totalInterferenceWatt = getTotalInterferenceWatt(); double totalInterferenceWatt = getTotalInterferenceWatt();
double extIntWatt = Mathematics.fromdBm2Watt(getTotalInterferenceBlocking()) double extIntWatt = Mathematics.fromdBm2Watt(getTotalInterferenceBlocking())
+ Mathematics.fromdBm2Watt(getTotalInterferenceUnwanted()); + Mathematics.fromdBm2Watt(getTotalInterferenceUnwanted());
interferencePower = Mathematics.fromWatt2dBm(totalInterferenceWatt + extIntWatt);
interSystemInterference = Mathematics.fromWatt2dBm(totalInterferenceWatt);
double v = rPowerWatt / (totalInterferenceWatt + extIntWatt); double v = rPowerWatt / (totalInterferenceWatt + extIntWatt);
achievedSINR = Mathematics.linear2dB(v); achievedSINR = Mathematics.linear2dB(v);
} }
...@@ -63,6 +70,14 @@ public class VictimImpl extends DefaultVictimImpl { ...@@ -63,6 +70,14 @@ public class VictimImpl extends DefaultVictimImpl {
return connection.getUserTerminal().getTotalInterferenceWatt(); return connection.getUserTerminal().getTotalInterferenceWatt();
} }
public double getInterferencePower() {
return interferencePower;
}
public double getInterSystemInterference() {
return interSystemInterference;
}
public double getNonInterferedAchievedSINR() { public double getNonInterferedAchievedSINR() {
return connection.getUserTerminal().getAchievedSINR(); return connection.getUserTerminal().getAchievedSINR();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment