substation function