为提高程序代码的保密性,采用DLL(动态链接库)进行编程.对船舶运动控制的核心控制算法,运用基于闭环增益成形算法的PID参数整定方法进行设计.用VB DLL对鲁棒PID控制算法进行编程,将其编译为.dll文件,在主程序中调用该文件.在8级风的恶劣海况下,该控制器能较好地保持航向,上升时间小于550 s,具有较强的鲁棒性.可见,DLL的引入在核心程序代码保密方面取得了令人满意的效果,同时又不影响用户的正常使用.
In order to improve the security of program codes,the program was developed using dynamic link library(DLL).The control algorithm,which is the kernel of ship motion controller,was designed with the PID parameters tuning technology based on the closed-loop gain shaping algorithm.The robust PID control algorithm was programmed using VB DLL,and the program was compiled as a.dll file which could be accessed by the main program.Under Beaufort No.8 heavy sea state,the closed-loop gain shaping PID controller could keep the preset course,the rising time was less than 550 s,and the controller had strong robust stability.The practical application show that the security of kernel program codes using dynamic link library is authentic and its applicability meets the requirements.