def loop_noise_coupling_functions(olg, clp, chp, lock='active'):
    """Control loop coupling functions for a opto-mechanical cavity.
    Inputs:
    -------
    olg: array of complex floats
        Open loop gain
    clp: array of complex floats
        Cavity low pass
    chp: array of complex floats
        Cavity high pass
    lock: string
        Either "active", representing locking the laser to the cavity,
        or "passive", representing locking the cavity to the laser.

    Outputs:
    --------
    a_in: array of complex floats
        Input frequency noise coupling to transmitted frequency noise
    a_sense: array of complex floats
        Sensing frequency noise coupling to transmitted frequency noise
    a_disp: array of complex floats
        Displacement frequency noise coupling to transmitted frequency noise
    """
    if lock == 'active':
        a_in = clp / (1 + clp * olg)
        a_sense = clp * olg / (1 + clp * olg)
        a_disp = clp**2 * olg / (1 + clp * olg) + chp
    else:
        a_in = clp * (1 + olg) / (1 + clp * olg)
        a_sense = chp * olg / (1 + clp * olg)
        a_disp = chp / (1 + clp * olg)

    return a_in, a_sense, a_disp