예제 #1
0
def bestk4(k3, k4Min, k4Max, numSteps):
    """
    Args:
        k3 (int): the given gain value
        k4Min, k4Max (int): a range of values for the argument
        numSteps (int): how many points to test within the range

    Returns:
        (tuple): the value of k4 for which the system converges most quickly, 
        within the range k4Min, k4Max and the value at this point
    """
    func = lambda k4: max(anglePlusPropModel(k3, k4).poleMagnitudes())
    return optimize.optOverLine(func, k4Min, k4Max, numSteps)
예제 #2
0
def bestk2(k1, k2Min, k2Max, numSteps):
    """
    Args:
        k1 (int): the given gain value
        k2Min, k2Max (int): a range of values for the argument
        numSteps (int): how many points to test within the range

    Returns:
        (tuple): the value of k2 for which the system converges most quickly, 
        within the range k2Min, k2Max and the value at this point
    """
    func = lambda k2: abs(delayPlusPropModel(k1, k2).dominantPole())
    return optimize.optOverLine(func, k2Min, k2Max, numSteps)
def bestk2(k1, k2Min, k2Max, numSteps):
    return optimize.optOverLine(
        lambda k2: abs(delayPlusPropModel(k1, k2).dominantPole()), k2Min,
        k2Max, numSteps)
예제 #4
0
def bestk2(k1, k2Min, k2Max, numSteps):
    return optimize.optOverLine(
        objective=lambda k2: delayPlusPropModel(k1, k2),
        xmin=k2Min,
        xmax=k2Max,
        numXsteps=numSteps)
예제 #5
0
def loopk4(k3, k4Min, k4Max, numSteps):
	func = lambda k4: max(anglePlusPropModel(k3, k4).poleMagnitudes())
	bestValue, bestK4 = optimize.optOverLine(func, k4Min, k4Max, numSteps)
	return (bestValue, bestK4)
	pass
예제 #6
0
def loopk2(k1, k2Min, k2Max, numSteps):
	func = lambda k2: abs(delayPlusPropModel(k1, k2).dominantPole())
	bestValue, bestK2 = optimize.optOverLine(func, k2Min, k2Max, numSteps)
	return (bestValue, bestK2)
	pass