In this paper, a novel analytical-based kinematic and dynamic modeling and control approach is developed for reference speed tracking of a multijoint robotic fish. The kinematic model is improved by the introduction of input signal for controlling body undulation amplitude without distorting the model structure. Next, the dynamic model is developed in the discrete-time domain primarily because fish swimming pattern generates oscillating continuous thrust where the effect of thrust over one cycle of undulation can be calculated through averaging. Hence, the dynamics can be discretized according to the undulation rate. The novelty in developing the discrete-time dynamical model is three fold. First, the thrust gradient is derived with assistance of Lighthill's large amplitude elongated body theory. More importantly, affine-in-control dynamical model form, essential for designing a real-time model-based control algorithm, is derived by inclusion of the updated kinematic model. Second, the thrust delay is studied via pulse input response of the motion system, and incorporated in the dynamical model. Third, drag force coefficient calculation is also proposed by comparing the thrust model and empirically recorded steady-state speeds of the robotic fish. Finally, discrete-time model-based sliding-mode control (SMC) is designed for speed tracking. Experimental results verify that SMC based on the proposed dynamical model, can significantly improve speed tracking performance of a multilink robotic fish.