Beispiel #1
0
 def corrections(self,frequency):
     assert self.amplifier == 'None (86205A)'
     
     forwardCorrection = bridgeInsertionTransferAt(frequency)
     reflectedCorrection = 1 / bridgeCouplingFactorAt(frequency)
     
     return (forwardCorrection,reflectedCorrection)
    def measure(self):
        assert self.switchPlatform.checkPreset(self.amplifiers[self.amplifier.value]),'The switch platform is not in the {position} position'.format(position=self.amplifier.value)

        result = DictResult()  
        generatorPower = self.rfGenerator.getPower()
        frequency = self.rfGenerator.getFrequency()        
        
        switchAttenuation = PowerRatio(sqrt(frequency/Frequency(170,'GHz')),'dB') # 2 switches - cable - cable - 2 switches
        # in the incident path, these losses cancel (same loss for DUT and incident power meter)
        # in the reflected path, these losses appear (the signal suffers from two cables and twice the switch platform)
           
        if self.amplifier.value == 'None':
            forwardPower = generatorPower * bridgeInsertionTransferAt(frequency)
            reflectedPower = self.wattMeter.getPower(2) / bridgeCouplingFactorAt(frequency)
#            insertionLoss = PowerRatio(1.5,'dB') * switchAttenuation
#            reflectedAttenuation = PowerRatio(16.0 + 0.6*sin(2*pi*frequency/Frequency(12,'GHz')),'dB')
#
#            forwardPower = generatorPower / insertionLoss
#            reflectedPower = self.wattMeter.getPower(2) * reflectedAttenuation * switchAttenuation
        else:
            if self.amplifier.value == 'Prana':
                forwardAttenuation = PowerRatio(48.7 - 0.4*sin(2*pi*frequency/Frequency(1,'GHz')),'dB')
                reflectedAttenuation = forwardAttenuation / PowerRatio(0.1,'dB')            
            elif self.amplifier.value == 'Milmega 1':
                forwardAttenuation = PowerRatio(44.9 - 0.6*sin(2*pi*(frequency-Frequency(900,'MHz'))/Frequency(2,'GHz')),'dB')
                reflectedAttenuation = forwardAttenuation * PowerRatio(0.4,'dB')
            elif self.amplifier.value == 'Milmega 2':
                forwardAttenuation = PowerRatio(43.6 - 0.6*sin(2*pi*(frequency-Frequency(1.9,'GHz'))/Frequency(4,'GHz')),'dB')
                reflectedAttenuation = PowerRatio(44.4 - 1.1*sin(2*pi*(frequency-Frequency(1.9,'GHz'))/Frequency(4,'GHz')),'dB')
            else:
                raise ValueError, 'The switch platform is in an unsupported position.'
                
            abPowers = self.wattMeter.getPower()
            forwardPower = abPowers(1) * forwardAttenuation
            reflectedPower = abPowers(2) * reflectedAttenuation * switchAttenuation


        result.data = {'generator power':generatorPower,
                       'transmitted power':forwardPower-reflectedPower,
                       'forward power':forwardPower,
                       'reflected power':reflectedPower}
        self.emitResult(result)
        return result
Beispiel #3
0
def reflectedPower():
    assert switchPlatform.preset == 'bridge'
    return incidentPower() * PowerRatio(-6,'dB') * bridgeCouplingFactorAt(rfGenerator.getFrequency())