Identification of time-varying bilinear systems using legendre series