Nonlinearity control and interconnection between physical systems are essential for many contemporary systems. Cyber Physical systems came about because of the growing number of security concerns with network control systems. Nonlinear physical systems are the primary subject of this study's investigation into control and cyber threat mitigation. Nonlinear physical systems are the focus of this study, which also delves into their control, modelling, and real-time implementation. Here, physical systems are defined as two kinds of benchmark nonlinear robotic systems: the Segway transporter and the cruise control system. Many see the Segway as an unstable and nonlinear physical system. By factoring in kinetic and potential energy, Lagrangian dynamics has allowed for the derivation of equations of motion. Next, a state-space model of the system is obtained by linearizing the nonlinear differential equations using Taylor series expansion of functions. This model is then transformed into two transfer functions, one for the tilt angle and one for the yaw angle. The Model Predictive Controller (MPC), GA Tuned PID, and PID are the building blocks of MATLAB's effective simulation study of nonlinear control.