def highzmini(N, Ie, Irly=None, Vset=None, Rrly=2000, Imov=0, CTR=1):
    """
    Minimum Current for High Impedance Protection Calculator
    
    Evaluates the minimum pickup current required to cause
    high-impedance bus protection element pickup.
    
    Parameters
    ----------
    N:          int
                Number of Current Transformers included in scheme
    Ie:         float
                The excitation current at the voltage setting
    Irly:       float, optional
                The relay current at voltage setting
    Vset:       float, optional
                The relay's voltage pickup setting in volts.
    Rrly:       float, optional
                The relay's internal resistance in ohms, default=2000
    Imov:       float, optional
                The overvoltage protection current at the
                voltage setting. default=0.0
    CTR:        float, optional
                Current Transformer Ratio, default=1
    
    Returns
    -------
    Imin:       float
                Minimum current required to cause high-impedance
                bus protection element pickup.
    """
    if Irly == Vset == None:
        raise ValueError('Relay Current Required.')
    Ie = abs(Ie)
    Imov = abs(Imov)
    if Irly == None:
        Vset = abs(Vset)
        Irly = Vset / Rrly
    else:
        Irly = abs(Irly)
    Imin = (N * Ie + Irly + Imov) * CTR
    return Imin
