Compared with offline simulation based on software
completely, Hardware-in-the-loop Simulation (HILS) is a
simulation method based on software and hardware coupling,
which can not only verify the principle of the model studied, but
also feedback hardware response for comparison, shorten
product test cycle, improve research and development efficiency
and accuracy. Taking the marine nuclear reactor as the
background, this paper modelled the main circuit of energy
power and the part of propulsion power output, simulated the
energy power module offline based on Modelica language, and
coupled Arduino MCU with LEGO parts to simulate the
hardware response of propulsion power output. This study used
OpenModelica to construct the steady-state and transient
simulation operation of the off-line simulation model, realized
the interaction between the hardware signal input and the offline
simulation model, processed the mechanical response of the
simulation output and communicated with the external
hardware. Finally, the feedback action response was compared
with the key parameters in the existing literature. The results
show that the simulation results of the model and the hardware
response feedback results are consistent with the literature
parameters, and based on the coupling of Modelica language
with Arduino MCU can carry out the HILS for the marine
nuclear power system in steady state and transient state.