On Data-Driven Modelling and Terminal Sliding Mode Control of Dynamic Systems with Applications