# Design of Real-Time Hardware-in-the-Loop TV Guidance System Simulation Platform

Authors: Zhongyuan Chen; Xiaoming Liu; Wanchun Chen
Journal: International Journal of Aerospace Engineering
 (2017)

---

## Abstract

This paper presents a novel design of a real-time hardware-in-the-loop (HIL) missile TV guidance system simulation platform, which consists of a development computer, a target computer, a turntable, a control cabin, and a joystick. The guidance system simulation model is created on the development computer by Simulink® and then downloaded to the target computer. Afterwards, Simulink Real-Time™ runs the model in real-time. Meanwhile, the target computer uploads the real-time simulation data back to the development computer. The hardware in the simulation loop isTV camera, encoders, control cabin, servomotors, and target simulator. In terms of hardware and software, the system has been simplified compared with the existing works. The volume of the turntable integrating the target simulator and the seeker simulator is about 0.036 cubic meters compared to the original 8 cubic meters, so it has a compact structure. The platform can perform the closed-loop control, so the simulation has high precision. Taking the TV guidance simulation as an example, in the case of target maneuvering, the final miss distance of the TV guidance missile is 0.11812 m, while the miss distance of the original system is 13 m. The trajectories obtained from the HIL and mathematical simulations substantially coincide. So the simulation results show that the proposed HIL simulation platform is effective.


---

## Body

## 1. Introduction

In recent years, with the breakthrough of computer, the mechanical and electrical control technologies are becoming more and more mature. The development and application of the system simulation technology also rise to a new stage. In order to improve the fidelity of the simulation, parts of the physical system are inserted into the simulation loop, instead of pure mathematical model. This simulation technique is called HIL simulation. Real-time is the most striking feature of the HIL simulation [1].In order to assess the performance of missile, a lot of simulation experiments need to be done in the development process. Normally, the human, material, and financial resources consumption of the field experiments is so large that the field experiments are conducted in the final stage of the development of the missile. However, the missile’s HIL simulation can be carried out repeatedly in the laboratory, and it is very economical. There are many related works in this field. Chen et al. [2] designed a hardware-in-the-loop simulation platform of infrared guidance system. Khamis et al. [3] designed an in progress investigation on the hardware in loop simulation (HILS) for semiactive homing guidance and control system. Fan et al. [4] designed a hardware-in-the-loop simulation system for guided shell based on laser semiactive seeker. However, each suffers from its own drawbacks, which are reliability, price, weight, and size. Pavic et al. [5] designed a new type of flight simulator for manual commands to line-of-sight guided missile. The simulator enables the operator to spot and track both the target and the missile on the monitor display and generates the steering commands by joystick in order to minimize the difference between the target and the missile line-of-sight. The simulator works well. But compared to [6], the physical parts in the simulation loop are only the operator and the joystick, so the simulation fidelity is not high enough. Liu et al. [6] designed a Simulink/RT-LAB based HIL missile guidance system simulation platform; the platform used infrared seeker, guidance processor, rudder control motors, airframe, and target simulator as the actual physical components in the simulation process. The whole simulation system is capable of simulating a number of guidance and control laws. The platform can simulate the actual engagement environment as much as possible, whereas each part is so large that the whole platform is about 8 m3. The structure and the process of simulation are complex. So it is inconvenient to employ. Moreover, the miss distance is nearly 13 m. The precision is low.Motivated by the difficulties experienced in the above, this paper presents a simple, small, and cheap design for missile TV guidance system HIL simulation platform. The presented platform can easily be used for engagement process simulation, attitude response testing, and seeker simulator performance testing. This paper explains in detail a realization of the platform for HIL simulation, its capability, and its advantages.This paper is structured as follows. Section2 introduces the hardware structure of the platform and the relationship between each part and the signal transfer process. Section 3 shows the realization process and simulation results of the TV guidance HIL simulation. Other functions that can be realized by the platform are implemented in Section 4. Conclusions and future work are finally given in Section 5.


## 2. System Structure

As shown in Figure1, the overall platform adopts the structure of a development computer, a target computer, a turntable, a control cabin, and a joystick. It is mainly based on the latest version Matlab® [7]’s real-time simulation module called “Simulink Real-Time” [8].Figure 1
The new HIL simulation platform.The operator can build, modify, and compile the simulation model conveniently by Simulink [9]’s powerful modeling capability and abundant mathematical calculation functions as well as Simulink Real-Time’s extensive hardware support capability, efficient code compilation capacity, and real-time hardware emulation capacity. The simulation model built on Simulink can be downloaded to the target computer and then drives the seeker simulator and the target simulator.It becomes evident from Figure2 that the system is simplified a lot as opposed to [6].Figure 2
System framework.Each part of the platform will be introduced one by one in the following.


### 2.1. Development Computer

The development computer is an industrial personal computer (IPC) which uses the Windows 7 operating system. Matlab 2016b, Simulink, and Simulink Real-Time are installed on the development computer.Simulink Real-Time is a professional industrial real-time simulation module. It supports real-time simulation and testing, including rapid control prototyping, DSP and vision system prototyping, and HIL simulation. Simulink Real-Time and Speedgoat target computer hardware are expressly designed to work together to create real-time systems for desktop, lab, and field environments. Simulink Real-Time can also be used with custom target computer and I/O hardware.Researchers can set up their own mathematical model on the Simulink, then use Simulink Real-Time to compile the dynamic system model into highly efficient C language codes, and download them to the target computer by the TCP/IP mode. Meanwhile, Simulink Real-Time also allows the development computer to receive the real-time data from the target computer, and then the development computer gets the information needed after the real-time data processing.In the process of simulation, the development computer is also a video workstation for real-time video processing. After the analog video signal of the seeker simulator is transmitted to the video station, the analog signal is converted into digital signal by the video capture card. The deviation angle between the target center and the center of field of view can be obtained by a self-designed video processing software. This deviation angle is called missile boresight errorε. The development computer uses RS232 communication technology to transfer the missile boresight error information to the target computer. The guidance model running on the target computer takes the boresight error as guidance information.A joystick is installed on the video workstation. The joystick signals are transmitted to the video station overUSB. Before the missile is launched, the operator can change the position of the wave gate by manipulating the joystick in order to search and lock on the target. After the missile is launched, the operator monitors the entire process of engagement with the display terminal. If the target is lost or a more important target appears, the operator can relock on the target using the joystick. In this way, the “man-in-the-loop” TV guidance simulation is realized.


### 2.2. Target Computer

The target computer is also an IPC, which is the operation center of the whole system. The target computer uses a U disk which has installed the DOS system as the starting disk. And some boot files generated from the development computer are put in the U disk in order to start the Simulink Real-Time in the target computer.A NI-PCI 6601 [10] card is installed on the target computer, which collects the pulse signal from the corresponding encoders of the seeker and the target simulators’ servomotors. The position, velocity, acceleration, and other pieces of information of the missile and target simulators can be obtained after signal processing. Meanwhile, the NI-PCI 6601 card outputs the motor control signals to the corresponding servomotors of the seeker and target simulators.The target computer transfers the real-time data to development computer through Intel8254x gigabit network card by TCP/IP mode.


### 2.3. Control Cabin

The self-designed control cabin is shown in Figure3. The core of the control cabin is the Printed Circuit Board (PCB) which is mainly based on a single chip microcomputer (SCM). The SCM is the core of a series of circuit and communication interfaces. The control cabin has two modes of operation, automatic control, and manual control.Figure 3
(a) is the control cabin, and (b) is the PCB.
(a)
(b)Unless the real-time model downloaded to the target computer is started, the control cabin operation mode is the manual control mode. The corresponding knobs under the LED display screens are used to manually adjust the target and the missile simulators’ angular position.When the real-time simulation model downloaded to the target computer is started, the control cabin turns to the automatic control mode. At this point, the two control knobs cannot control the motion of the seeker simulator or the target simulator. The control cabin receives the commands from the target computer, and these commands are processed by the SCM in order to control the servomotors in the turntable with the driving circuits for motors. Meanwhile, the control cabin receives signals from the corresponding encoders of the seeker simulator and the target simulator andpasses them to the target computer for further processing. Thus, a closed-loop control is realized in the above process.


### 2.4. Turntable

As shown in Figure4, the self-designed turntable integrates the missile and target simulators into only one frame. The coaxial design achieves the concentric and independent rotation of the missile and the target. The special structure of the turntable makes itself very small and can be carried by a single hand. The turntable has been applied for national invention patent of China; the application number is 201610015363.Figure 4
Dynamic turntable.A TV camera (a CCD color camera) is installed on the top of the turntable, which is equivalent to the TV seeker. The image information collected by the CCD camera can be transmitted to the video workstation through a conductive ring and video lines. The TV camera’s power is provided by the control cabin. By using the conductive ring, the seeker simulator can rotate 360 degrees freely, and the image quality of the video is high.Another important part of the turntable is the target simulator which is used to simulate the motion of the target. In addition, the target simulator also provides the optical characteristic information for the seeker.The motion of the seeker and target simulators are driven by their corresponding servomotors. The shafts of the seeker and target simulators drive the corresponding encoders, and the encoders generate pulse signals. The signals of encoders are transmittedthrough control cabin to the target computer for real-time processing. Meanwhile, the target computer uses the information to get the control commands for the motion of the seeker and target simulators and then transmit themback to the control cabin. The control cabin transforms the signals calculated from target computer to the motor driving commands.The physical connection between the various parts of the HIL simulation platform is shown in Figure5.Figure 5
Components connection diagram.


## 2.1. Development Computer

The development computer is an industrial personal computer (IPC) which uses the Windows 7 operating system. Matlab 2016b, Simulink, and Simulink Real-Time are installed on the development computer.Simulink Real-Time is a professional industrial real-time simulation module. It supports real-time simulation and testing, including rapid control prototyping, DSP and vision system prototyping, and HIL simulation. Simulink Real-Time and Speedgoat target computer hardware are expressly designed to work together to create real-time systems for desktop, lab, and field environments. Simulink Real-Time can also be used with custom target computer and I/O hardware.Researchers can set up their own mathematical model on the Simulink, then use Simulink Real-Time to compile the dynamic system model into highly efficient C language codes, and download them to the target computer by the TCP/IP mode. Meanwhile, Simulink Real-Time also allows the development computer to receive the real-time data from the target computer, and then the development computer gets the information needed after the real-time data processing.In the process of simulation, the development computer is also a video workstation for real-time video processing. After the analog video signal of the seeker simulator is transmitted to the video station, the analog signal is converted into digital signal by the video capture card. The deviation angle between the target center and the center of field of view can be obtained by a self-designed video processing software. This deviation angle is called missile boresight errorε. The development computer uses RS232 communication technology to transfer the missile boresight error information to the target computer. The guidance model running on the target computer takes the boresight error as guidance information.A joystick is installed on the video workstation. The joystick signals are transmitted to the video station overUSB. Before the missile is launched, the operator can change the position of the wave gate by manipulating the joystick in order to search and lock on the target. After the missile is launched, the operator monitors the entire process of engagement with the display terminal. If the target is lost or a more important target appears, the operator can relock on the target using the joystick. In this way, the “man-in-the-loop” TV guidance simulation is realized.


## 2.2. Target Computer

The target computer is also an IPC, which is the operation center of the whole system. The target computer uses a U disk which has installed the DOS system as the starting disk. And some boot files generated from the development computer are put in the U disk in order to start the Simulink Real-Time in the target computer.A NI-PCI 6601 [10] card is installed on the target computer, which collects the pulse signal from the corresponding encoders of the seeker and the target simulators’ servomotors. The position, velocity, acceleration, and other pieces of information of the missile and target simulators can be obtained after signal processing. Meanwhile, the NI-PCI 6601 card outputs the motor control signals to the corresponding servomotors of the seeker and target simulators.The target computer transfers the real-time data to development computer through Intel8254x gigabit network card by TCP/IP mode.


## 2.3. Control Cabin

The self-designed control cabin is shown in Figure3. The core of the control cabin is the Printed Circuit Board (PCB) which is mainly based on a single chip microcomputer (SCM). The SCM is the core of a series of circuit and communication interfaces. The control cabin has two modes of operation, automatic control, and manual control.Figure 3
(a) is the control cabin, and (b) is the PCB.
(a)
(b)Unless the real-time model downloaded to the target computer is started, the control cabin operation mode is the manual control mode. The corresponding knobs under the LED display screens are used to manually adjust the target and the missile simulators’ angular position.When the real-time simulation model downloaded to the target computer is started, the control cabin turns to the automatic control mode. At this point, the two control knobs cannot control the motion of the seeker simulator or the target simulator. The control cabin receives the commands from the target computer, and these commands are processed by the SCM in order to control the servomotors in the turntable with the driving circuits for motors. Meanwhile, the control cabin receives signals from the corresponding encoders of the seeker simulator and the target simulator andpasses them to the target computer for further processing. Thus, a closed-loop control is realized in the above process.


## 2.4. Turntable

As shown in Figure4, the self-designed turntable integrates the missile and target simulators into only one frame. The coaxial design achieves the concentric and independent rotation of the missile and the target. The special structure of the turntable makes itself very small and can be carried by a single hand. The turntable has been applied for national invention patent of China; the application number is 201610015363.Figure 4
Dynamic turntable.A TV camera (a CCD color camera) is installed on the top of the turntable, which is equivalent to the TV seeker. The image information collected by the CCD camera can be transmitted to the video workstation through a conductive ring and video lines. The TV camera’s power is provided by the control cabin. By using the conductive ring, the seeker simulator can rotate 360 degrees freely, and the image quality of the video is high.Another important part of the turntable is the target simulator which is used to simulate the motion of the target. In addition, the target simulator also provides the optical characteristic information for the seeker.The motion of the seeker and target simulators are driven by their corresponding servomotors. The shafts of the seeker and target simulators drive the corresponding encoders, and the encoders generate pulse signals. The signals of encoders are transmittedthrough control cabin to the target computer for real-time processing. Meanwhile, the target computer uses the information to get the control commands for the motion of the seeker and target simulators and then transmit themback to the control cabin. The control cabin transforms the signals calculated from target computer to the motor driving commands.The physical connection between the various parts of the HIL simulation platform is shown in Figure5.Figure 5
Components connection diagram.


## 3. The Realization of HIL Simulation

By using the HIL simulation platform introduced above, a variety of simulation experiments can be carried out.For example, the procession of the TV guidance engagement simulation is studied.


### 3.1. Mathematical Engagement Modeling

A typical engagement model [11] studied in this paper is shown in Figure 6.Figure 6
Engagement model.Here, the missile uses the proportional navigation guidance law. Theoretically, the proportional navigation guidance law issues acceleration commands, perpendicular to the instantaneous missile-target line-of-sight, which are proportional to the line-of-sight rate and closing velocity. Mathematically, the guidance law can be stated as(1)nc=N′Vcλ˙,where nc is the acceleration command (in m/s2), N′ is a unitless designer-chosen gain (usually in the range of 3–5) known as the effective navigation ratio, Vc is the missile-target closing velocity (in m/s), and λ˙ is the line-of-sight (LOS) angle (in rad). The overdot indicates the time derivative of the LOS angle or the LOS rate.In the engagement model, the target can maneuver evasively with acceleration magnitudenT. Here, the target does the following maneuver:(2)nT=-1g,where g=9.8m/s2.Since target accelerationnT in the preceding model is perpendicular to the target velocity vector, the angular velocity of the target β˙ can be expressed as(3)β˙=nTVT,where VT is the magnitude of the target velocity.Then, all of the differential equations required to model a complete missile-target engagement in two dimensions can be easily deduced from Figure6. They are as follows:(4)VT1=VTcos⁡β,R˙T1=VT1,R˙M1=VM1,V˙M1=aM1VT2=VTsin⁡β,R˙T2=VT2,R˙M2=VM2,V˙M2=aM2RTM1=RT1-RM1,VTM1=VT1-VM1RTM2=RT2-RM2,VTM2=VT2-VM2λ=tan-1RTM2RTM1λ˙=RTM1VTM2-RTM2VTM1RTM2RTM=RTM12+RTM221/2Vc=-R˙TM=-RTM1VTM1+RTM2VTM2RTMaM1=-ncsin⁡λ,aM2=nccos⁡λ,where 1 and the 2 in the subscript represent the horizontal and vertical directions, respectively. β is the flight-path angle of the target, VM is the magnitude of the missile velocity, aM is the missile acceleration components in the Earth coordinate system, and RTM is the distance from the missile to the target.The initial condition is as follows.Missile velocity isVM=700m/s, the launch angle is λ0=30°, and the initial location is (xM0,yM0)=(0m,0m).Target velocity isVT=300m/s, the launch angle is β0=30°, and the initial location is (xT0,yT0)=(4000m,2000m).Here, the effective navigation ratioN′ is 4.


### 3.2. HIL Simulation Modeling

Firstly, as shown in Figure7, a simulation model based on the preceding engagement model is built by Simulink.Figure 7
Simulation model built on the Simulink.The “engagement model” subsystem is based on the mathematical engagement model in the above section. The “LOS” system in Figure7 is comprised of “Target_Motor,” “Seeker_Motor,” and “TV Seeker” subsystems as shown in Figure 8. The components and functions of the three subsystems are described in the following text.Figure 8
LOS subsystem.The “engagement model” subsystem’s output “lambda_dot,” namely,λ˙, calculated from (4) is the input velocity command of “LOS” subsystem for driving the target simulator at certain velocities through one of the two motors fixed in the turntable. In the meantime, the other motor is used for driving the TV camera to follow the target as far as possible utilizing the input command “lambdadot_c” from the “TV Seeker” subsystem. Therefore, the control parameter of the motors in this HIL simulation is their angular velocity. Figure 9 shows the theoretical line-of-sight (LOS) rate of the engagement mathematical simulation.Figure 9
LOS rate of engagement mathematical simulation.The magnitude of the mathematical LOS rate is about 0.7 deg/s, and the whole engagement process costs 11.17 s. So the target simulator’s rotation reach in the HIL simulation can be estimated according to(5)Rotationreach=0.7deg/s×11.17s=7.819deg.However, this reach is so small that the rotation of the target simulator cannot be clearly observed in one simulation. In order to enlarge the rotation reach of the target simulator,Gain=4 is inserted before the “Target_Motor” subsystem. Therefore, the target simulator rotation reach becomes about 30 deg. What is more, there should be a block 1/Gain=1/4 for neutralizing the magnification.In this study, a PID controller design is considered for controlling the motor velocity since it does not require the knowledge of the dynamic model [12]. The mathematical expression of the controller u(t) is as follows:(6)ut=KPet+KI∫0tetdt+KDdetdt,where e(t) is the error of motor angular velocity command r(t) and its response y(t) which means that (7)et=rt-yt.The proportional, integral, and derivative gain factors of the target and seeker simulators driving the motors are set to(8)KP=60.00009.00,KI=50.000012.00,KD=0.01000.05,respectively.Figure10 is the “Target_Motor” subsystem. The red dashed box contains the proportional, integral, and derivative terms of the PID controller. The green dashed box provides motor pulse width modulation (PWM) signals using a PCI 6601 Pulse Generation block. The inputs to the Pulse Generation block are separate, one for the high count and one for the low count. The reference frequency for PCI 6601 [13] is 20 MHz, so the sum of the high count and the low count is 1000 if the PWM frequency is set to 20 KHz. It should be noted that this frequency can also be other values. Thus, a saturation block is placed before the green dashed box to make the high count less than or equal to 1000. In addition, the high count must be greater than or equal to zero. Besides, the direction command is taken from the red PID box through a sign block. The PCI 6601 Digital Output block transfers the direction commands to the motor driving circuit on the PCB installed in the control cabin.Figure 10
Target_Motor subsystem.The function of the blocks in the blue dashed box is motor angular velocity measuring. The encoders used in the study has 5000 counts per rotate (CPR), so each count of the PCI6601 ENC block means that the motor has turned 0.072 degrees. The sample timeT is 0.05 s here. Therefore, the motor angular velocity [14] is (9)ω=0.072NTdeg/s,where ω is the motor instantaneous angular velocity and N is the count of the PCI6601 ENC block. The output count N of the PCI6601 ENC block is a signed integer, which means that the rotation of the motor can be determined through its sign. The constant EN=1 enables the control cabin to work at the automatic control mode.The “Seeker_Motor” subsystem shown in Figure11 is similar to the “Target_Motor” subsystem. The output “lambdadot_real,” namely, λ˙, is for calculating the missile command acceleration using (1). A low-pass filter is placed before the “lambdadot_real” output to smooth the actual angular velocity curve, because the encoders output discontinuous pulse signals, which causes that the actual angular velocity output curve is rough.Figure 11
Seeker_Motor subsystem.Sample plots of the angular velocity errorse(t) are presented in Figure 12. In this experiment, initial angular velocities of the target and seeker simulators are zero, and the command angular velocities are set to 30 deg/s. As can be seen in Figure 12, the angular velocity errors are driven to the vicinity of zero. Additionally, the seeker simulator motor angular velocity response curve has bigger random fluctuation around zero compared with the target simulator motor angular velocity response curve, which is because that the shaft of the seeker simulator motor is more unsmooth. Still, this disturbance has little influence on the closed-loop HIL simulation; the simulation results are shown in the next section.Figure 12
Response of the PID controllers.After setting the appropriate parameters for the simulation model, it is compiled and downloaded to the target computer. Until compiling and downloading the simulation model successfully, the operator operates the joystick and controls the direction of the seeker to find the target. When the target is found, the operator adjusts the wave gate to the position of the target and pulls on the joystick trigger.Then, the wave gate locks on the target, and the missile can be fired at this time. Self-designed TV image processing program interface is shown in Figure13. It needs to be noted that the target silhouette is constant over the time in one simulation.Figure 13
TV guidance image processing interface.As shown in Figure14, after a series of video processing [15], the angle position deviation between the center of the target and the center of the TV seeker simulator field of view (FOV), namely, the missile boresight error ε, is achieved and transferred to the target computer by RS232. The “TV Seeker” subsystem shown in Figure 15 is a battery of blocks for obtaining the missile boresight error ε during the HIL real-time simulation.Figure 14
Video processing block diagram.Figure 15
TV Seeker subsystem.As shown in Figure16, the basic geometry of the missile, seeker, and target for the platform here comes from [11].Figure 16
Basic geometry of the missile, seeker, and target.In Figure16, D is the angle of the seeker optical axis measured counterclockwise from the reference axis. From the figure, here is(10)ε=λ-D.By differentiation, we get(11)ε˙=λ˙-D˙.According to [11], Paul Zarchan used a low-pass filter to estimate D. The relationship of D˙ and ε is (12)D˙=1Tλ-D=εT,where T is the time constant of the low-pass filter.By substituting (12) into (11), we obtain (13)ε˙=λ˙-εT.Taking Laplace transform on the above equation, we get(14)sε+εT=sλ.After some algebra, there is(15)ε=ss+1/Tλ=TsλTs+1=T1Ts+1λ˙.As time tends to infinity,1/Ts+1 tends to 1. In this case, the above equation becomes the following:(16)ε=Tλ˙.which means that (17)λ˙=1Tε.By lettingk=1/T, then the following is gotten: (18)λ˙=kε.λ
˙ in the above equation is the input “lambdadot_c” of the “Seeker_Motor” subsystem. It is the velocity command for driving the seeker simulator. The value of k affects the ability of the seeker to track the target. Let the target simulator rotate at certain velocities; then the performances of the seeker simulator are recorded when k is different values as shown in Figure 17. If k is small, which means that the time constant is great, the seeker simulator response is slow as shown in Figure 17(a). This causes that the seeker finally loses the target as shown in Figure 18.Figure 17
Seeker simulator tracking performance and missile boresight error corresponding to differentk during the HIL simulation. The green line is the command angular velocity for the target simulator. The red line is the response of the target simulator for the velocity command. The blue line is the seeker simulator angular velocity when it tracks the target. And the black line is missile boresight error corresponding to the tracking process shown in (a), (c), (e), and (g).
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)Figure 18
The process of the seeker tracking the target whenk=1.
(a)
(b)
(c)With the increase ofk, the missile boresight error becomes smaller as can be seen in Figure 17, which reduces the requirement of missile attitude control acceleration in actual engagements [16]. So k can be infinity in theory. However, in practice, a large k makes the seeker jitter as can be seen in Figures 17(g) and 17(h). If the jitter is even faster than the speed of video processing, the seeker also loses the target as shown in Figure 19. In the end, k equals 10 here, which makes the seeker simulator have an enough response speed and insignificant jitter.The reasons for the jitter are as follows.Figure 19
The process of the seeker tracking the target whenk=30.
(a)
(b)
(c)A type of Brushless Direct Current Motor (BLDCM) is used in this study for driving both the seeker simulator and target simulators. In the HIL simulation, the PWM commands for the motors can be equivalent to the voltage commands. According to the DC motor theory [17], the voltage balance equation is as shown as follows:(19)U=LdIdt+IR+E,where U is armature control voltage, E is back electromotive force, I is armature current, R is armature windings resistance, and L is armature inductance.The motor angular velocity can be determined by(20)ω=U-IRCe,where ω denotes the angular velocity of motor and Ce is the back electromotive force constant.The transfer function of the motor can be obtained by combining the equations above and Laplace transform:(21)ωsUs=1/CeTLTms2+Tms+1,where TL=L/R, Tm=RJ/CeCm, and TL is electromagnetic time constant, Tm is electromechanical time constant, J is equivalent moment of inertia to motor shaft, and Cm is electromagnetic torque coefficient.After some algebra, there is(22)ωsUs=1CeCeCm/LJs2+R/Ls+CeCm/LJ.It is a typical two-order system [18], so it can be written as the following form:(23)ωsUs=1Ceωn2s2+2ζωns+ωn2,where(24)ωn=CeCmLJ(25)ζ=R2JLCeCm.The characteristic equation of the two-order system is(26)s2+2ζωns+ωn2=0and the eigenvalue is (27)s1,2=-ζωn±ωnζ2-1.Since the armature windings resistanceR, the armature inductance L, the back electromotive force constant Ce, and electromagnetic torque coefficient Cm in (25) are characteristics of the motor, the above parameters’ values of the motors used for driving the seeker and target simulators are nearly the same. However, due to the fact that load of the two motors are different, the equivalent moments of inertia to motor shaft J are different. The TV camera is empty except for a board with CCD, so its mass is very small. Besides, as can be seen in Figure 4, the TV camera has a short length, so the “equivalent moment of inertia to motor shaft” JTV of the motor for driving the TV camera has a small value. Then, the corresponding ζTV calculated by equation is (28)ζTV=R2JTVLCeCm.If the smallJTV leads to 0<ζTV<1, the characteristic equation has a pair of conjugate complex roots with negative real part. So the two-order system is an underdamped system whose step response is a damped oscillatory process. In a dynamical process, oscillation causes the constantly changing of the missile boresight error ε, as the black lines shown in Figure 17. According to (18), the oscillation of ε makes the input λ˙ of the motor constantly change. Therefore, the dynamical response is oscillatory. Furthermore, when k is larger, which means that λ˙ is larger, the amplitude of the oscillation is greater. The results of the HIL simulation are consistent with the preceding theoretical analysis, as the blue lines shown in Figure 17.On the other hand, the target simulator is an aluminum rod with long length and large mass and the center of rotation is on one of its ends in the HIL simulation, so the “equivalent moment of inertia to motor shaft”JTarget of the motor for driving the target simulator is large. Then, the corresponding ζTarget calculated by equation is (29)ζTarget=R2JTargetLCeCm.If the largeJTarget leads to 1≤ζTarget, the characteristic equation has a pair of real roots. So the two-order system’s step response is a nonoscillatory process as the red lines shown in Figure 17. The HIL real-time simulation results and theoretical analysis are consistent.Figure20 shows the real-time state of the HIL simulation process. Figures 20(a) and 20(b) show the real-time scene that the seeker simulator is tracking the target simulator. Figure 20(c) is the guidance cabin which is showing its own states and the angle position of the seeker and target simulators. Figure 20(d) is the output interface of Simulink Real-Time which shows the key parameters such as the miss distance, command acceleration, and boresight error.Figure 20
The platform is implementing the TV guidance simulation.
(a)
(b)
(c)
(d)Based on the introduction above, the signal transmission process of the HIL simulation platform is achieved, as shown in Figure21.Figure 21
Signal transmission block diagram.In the simulation loop, the target simulator moves in accordance with the custom laws shown in (4); that is,(30)λ˙=RTM1VTM2-RTM2VTM1RTM2.The command angular velocity calculated by (18) drives the seeker simulator. The simulation model can acquire the LOS rate between the missile and the target. According to the proportional navigation guidance law, the command acceleration of the missile nc is obtained.


### 3.3. Simulation Results

The trajectory of the missile and the target is shown in Figure22. It can be seen from the figure that the missile intercepts the target successfully. Furthermore, the HIL real-time simulation trajectory is almost coincident with the mathematical simulation trajectory, which illustrates that the results of real-time simulation are correct. The miss distance is shown in Figure 23.Figure 22
Trajectory.Figure 23
Miss distance.During the HIL simulation, the relative distance between the missile and the target slips rapidly as the time goes on as can be seen in Figure23. The final miss distance of the HIL simulation is only 0.09846 m which is almost the theoretical 0 m, so the missile can destroy the target.As shown in Figure24, the actual LOS rate curve almost matches the theoretical curve. The initial value of the actual curve is larger, which is because that target is not in the center of the seeker FOV in the beginning as shown in Figure 25 according to (18). Although the actual curve fluctuates due to the principle shown in (18), the preceding results have illustrated that this phenomenon has no effect on the simulation process or the simulation results. As can be seen in Figure 25, the missile boresight error decreases rapidly after the missile is fired and finally goes to around zero as a result of the guidance law controlling the missile to enter the collision triangle.Figure 24
Actual and theoretical LOS.Figure 25
Missile boresight error.In order to illustrate the effectiveness of the HIL simulation platform better, we make the target do the S maneuver. After the seeker locks on the target, the seeker automatically tracks the target. As shown in Figure26, the seeker platform angle and LOS angle curves almost coincide. There is almost no delay.Figure 26
Seeker platform angle and LOS angle.


## 3.1. Mathematical Engagement Modeling

A typical engagement model [11] studied in this paper is shown in Figure 6.Figure 6
Engagement model.Here, the missile uses the proportional navigation guidance law. Theoretically, the proportional navigation guidance law issues acceleration commands, perpendicular to the instantaneous missile-target line-of-sight, which are proportional to the line-of-sight rate and closing velocity. Mathematically, the guidance law can be stated as(1)nc=N′Vcλ˙,where nc is the acceleration command (in m/s2), N′ is a unitless designer-chosen gain (usually in the range of 3–5) known as the effective navigation ratio, Vc is the missile-target closing velocity (in m/s), and λ˙ is the line-of-sight (LOS) angle (in rad). The overdot indicates the time derivative of the LOS angle or the LOS rate.In the engagement model, the target can maneuver evasively with acceleration magnitudenT. Here, the target does the following maneuver:(2)nT=-1g,where g=9.8m/s2.Since target accelerationnT in the preceding model is perpendicular to the target velocity vector, the angular velocity of the target β˙ can be expressed as(3)β˙=nTVT,where VT is the magnitude of the target velocity.Then, all of the differential equations required to model a complete missile-target engagement in two dimensions can be easily deduced from Figure6. They are as follows:(4)VT1=VTcos⁡β,R˙T1=VT1,R˙M1=VM1,V˙M1=aM1VT2=VTsin⁡β,R˙T2=VT2,R˙M2=VM2,V˙M2=aM2RTM1=RT1-RM1,VTM1=VT1-VM1RTM2=RT2-RM2,VTM2=VT2-VM2λ=tan-1RTM2RTM1λ˙=RTM1VTM2-RTM2VTM1RTM2RTM=RTM12+RTM221/2Vc=-R˙TM=-RTM1VTM1+RTM2VTM2RTMaM1=-ncsin⁡λ,aM2=nccos⁡λ,where 1 and the 2 in the subscript represent the horizontal and vertical directions, respectively. β is the flight-path angle of the target, VM is the magnitude of the missile velocity, aM is the missile acceleration components in the Earth coordinate system, and RTM is the distance from the missile to the target.The initial condition is as follows.Missile velocity isVM=700m/s, the launch angle is λ0=30°, and the initial location is (xM0,yM0)=(0m,0m).Target velocity isVT=300m/s, the launch angle is β0=30°, and the initial location is (xT0,yT0)=(4000m,2000m).Here, the effective navigation ratioN′ is 4.


## 3.2. HIL Simulation Modeling

Firstly, as shown in Figure7, a simulation model based on the preceding engagement model is built by Simulink.Figure 7
Simulation model built on the Simulink.The “engagement model” subsystem is based on the mathematical engagement model in the above section. The “LOS” system in Figure7 is comprised of “Target_Motor,” “Seeker_Motor,” and “TV Seeker” subsystems as shown in Figure 8. The components and functions of the three subsystems are described in the following text.Figure 8
LOS subsystem.The “engagement model” subsystem’s output “lambda_dot,” namely,λ˙, calculated from (4) is the input velocity command of “LOS” subsystem for driving the target simulator at certain velocities through one of the two motors fixed in the turntable. In the meantime, the other motor is used for driving the TV camera to follow the target as far as possible utilizing the input command “lambdadot_c” from the “TV Seeker” subsystem. Therefore, the control parameter of the motors in this HIL simulation is their angular velocity. Figure 9 shows the theoretical line-of-sight (LOS) rate of the engagement mathematical simulation.Figure 9
LOS rate of engagement mathematical simulation.The magnitude of the mathematical LOS rate is about 0.7 deg/s, and the whole engagement process costs 11.17 s. So the target simulator’s rotation reach in the HIL simulation can be estimated according to(5)Rotationreach=0.7deg/s×11.17s=7.819deg.However, this reach is so small that the rotation of the target simulator cannot be clearly observed in one simulation. In order to enlarge the rotation reach of the target simulator,Gain=4 is inserted before the “Target_Motor” subsystem. Therefore, the target simulator rotation reach becomes about 30 deg. What is more, there should be a block 1/Gain=1/4 for neutralizing the magnification.In this study, a PID controller design is considered for controlling the motor velocity since it does not require the knowledge of the dynamic model [12]. The mathematical expression of the controller u(t) is as follows:(6)ut=KPet+KI∫0tetdt+KDdetdt,where e(t) is the error of motor angular velocity command r(t) and its response y(t) which means that (7)et=rt-yt.The proportional, integral, and derivative gain factors of the target and seeker simulators driving the motors are set to(8)KP=60.00009.00,KI=50.000012.00,KD=0.01000.05,respectively.Figure10 is the “Target_Motor” subsystem. The red dashed box contains the proportional, integral, and derivative terms of the PID controller. The green dashed box provides motor pulse width modulation (PWM) signals using a PCI 6601 Pulse Generation block. The inputs to the Pulse Generation block are separate, one for the high count and one for the low count. The reference frequency for PCI 6601 [13] is 20 MHz, so the sum of the high count and the low count is 1000 if the PWM frequency is set to 20 KHz. It should be noted that this frequency can also be other values. Thus, a saturation block is placed before the green dashed box to make the high count less than or equal to 1000. In addition, the high count must be greater than or equal to zero. Besides, the direction command is taken from the red PID box through a sign block. The PCI 6601 Digital Output block transfers the direction commands to the motor driving circuit on the PCB installed in the control cabin.Figure 10
Target_Motor subsystem.The function of the blocks in the blue dashed box is motor angular velocity measuring. The encoders used in the study has 5000 counts per rotate (CPR), so each count of the PCI6601 ENC block means that the motor has turned 0.072 degrees. The sample timeT is 0.05 s here. Therefore, the motor angular velocity [14] is (9)ω=0.072NTdeg/s,where ω is the motor instantaneous angular velocity and N is the count of the PCI6601 ENC block. The output count N of the PCI6601 ENC block is a signed integer, which means that the rotation of the motor can be determined through its sign. The constant EN=1 enables the control cabin to work at the automatic control mode.The “Seeker_Motor” subsystem shown in Figure11 is similar to the “Target_Motor” subsystem. The output “lambdadot_real,” namely, λ˙, is for calculating the missile command acceleration using (1). A low-pass filter is placed before the “lambdadot_real” output to smooth the actual angular velocity curve, because the encoders output discontinuous pulse signals, which causes that the actual angular velocity output curve is rough.Figure 11
Seeker_Motor subsystem.Sample plots of the angular velocity errorse(t) are presented in Figure 12. In this experiment, initial angular velocities of the target and seeker simulators are zero, and the command angular velocities are set to 30 deg/s. As can be seen in Figure 12, the angular velocity errors are driven to the vicinity of zero. Additionally, the seeker simulator motor angular velocity response curve has bigger random fluctuation around zero compared with the target simulator motor angular velocity response curve, which is because that the shaft of the seeker simulator motor is more unsmooth. Still, this disturbance has little influence on the closed-loop HIL simulation; the simulation results are shown in the next section.Figure 12
Response of the PID controllers.After setting the appropriate parameters for the simulation model, it is compiled and downloaded to the target computer. Until compiling and downloading the simulation model successfully, the operator operates the joystick and controls the direction of the seeker to find the target. When the target is found, the operator adjusts the wave gate to the position of the target and pulls on the joystick trigger.Then, the wave gate locks on the target, and the missile can be fired at this time. Self-designed TV image processing program interface is shown in Figure13. It needs to be noted that the target silhouette is constant over the time in one simulation.Figure 13
TV guidance image processing interface.As shown in Figure14, after a series of video processing [15], the angle position deviation between the center of the target and the center of the TV seeker simulator field of view (FOV), namely, the missile boresight error ε, is achieved and transferred to the target computer by RS232. The “TV Seeker” subsystem shown in Figure 15 is a battery of blocks for obtaining the missile boresight error ε during the HIL real-time simulation.Figure 14
Video processing block diagram.Figure 15
TV Seeker subsystem.As shown in Figure16, the basic geometry of the missile, seeker, and target for the platform here comes from [11].Figure 16
Basic geometry of the missile, seeker, and target.In Figure16, D is the angle of the seeker optical axis measured counterclockwise from the reference axis. From the figure, here is(10)ε=λ-D.By differentiation, we get(11)ε˙=λ˙-D˙.According to [11], Paul Zarchan used a low-pass filter to estimate D. The relationship of D˙ and ε is (12)D˙=1Tλ-D=εT,where T is the time constant of the low-pass filter.By substituting (12) into (11), we obtain (13)ε˙=λ˙-εT.Taking Laplace transform on the above equation, we get(14)sε+εT=sλ.After some algebra, there is(15)ε=ss+1/Tλ=TsλTs+1=T1Ts+1λ˙.As time tends to infinity,1/Ts+1 tends to 1. In this case, the above equation becomes the following:(16)ε=Tλ˙.which means that (17)λ˙=1Tε.By lettingk=1/T, then the following is gotten: (18)λ˙=kε.λ
˙ in the above equation is the input “lambdadot_c” of the “Seeker_Motor” subsystem. It is the velocity command for driving the seeker simulator. The value of k affects the ability of the seeker to track the target. Let the target simulator rotate at certain velocities; then the performances of the seeker simulator are recorded when k is different values as shown in Figure 17. If k is small, which means that the time constant is great, the seeker simulator response is slow as shown in Figure 17(a). This causes that the seeker finally loses the target as shown in Figure 18.Figure 17
Seeker simulator tracking performance and missile boresight error corresponding to differentk during the HIL simulation. The green line is the command angular velocity for the target simulator. The red line is the response of the target simulator for the velocity command. The blue line is the seeker simulator angular velocity when it tracks the target. And the black line is missile boresight error corresponding to the tracking process shown in (a), (c), (e), and (g).
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)Figure 18
The process of the seeker tracking the target whenk=1.
(a)
(b)
(c)With the increase ofk, the missile boresight error becomes smaller as can be seen in Figure 17, which reduces the requirement of missile attitude control acceleration in actual engagements [16]. So k can be infinity in theory. However, in practice, a large k makes the seeker jitter as can be seen in Figures 17(g) and 17(h). If the jitter is even faster than the speed of video processing, the seeker also loses the target as shown in Figure 19. In the end, k equals 10 here, which makes the seeker simulator have an enough response speed and insignificant jitter.The reasons for the jitter are as follows.Figure 19
The process of the seeker tracking the target whenk=30.
(a)
(b)
(c)A type of Brushless Direct Current Motor (BLDCM) is used in this study for driving both the seeker simulator and target simulators. In the HIL simulation, the PWM commands for the motors can be equivalent to the voltage commands. According to the DC motor theory [17], the voltage balance equation is as shown as follows:(19)U=LdIdt+IR+E,where U is armature control voltage, E is back electromotive force, I is armature current, R is armature windings resistance, and L is armature inductance.The motor angular velocity can be determined by(20)ω=U-IRCe,where ω denotes the angular velocity of motor and Ce is the back electromotive force constant.The transfer function of the motor can be obtained by combining the equations above and Laplace transform:(21)ωsUs=1/CeTLTms2+Tms+1,where TL=L/R, Tm=RJ/CeCm, and TL is electromagnetic time constant, Tm is electromechanical time constant, J is equivalent moment of inertia to motor shaft, and Cm is electromagnetic torque coefficient.After some algebra, there is(22)ωsUs=1CeCeCm/LJs2+R/Ls+CeCm/LJ.It is a typical two-order system [18], so it can be written as the following form:(23)ωsUs=1Ceωn2s2+2ζωns+ωn2,where(24)ωn=CeCmLJ(25)ζ=R2JLCeCm.The characteristic equation of the two-order system is(26)s2+2ζωns+ωn2=0and the eigenvalue is (27)s1,2=-ζωn±ωnζ2-1.Since the armature windings resistanceR, the armature inductance L, the back electromotive force constant Ce, and electromagnetic torque coefficient Cm in (25) are characteristics of the motor, the above parameters’ values of the motors used for driving the seeker and target simulators are nearly the same. However, due to the fact that load of the two motors are different, the equivalent moments of inertia to motor shaft J are different. The TV camera is empty except for a board with CCD, so its mass is very small. Besides, as can be seen in Figure 4, the TV camera has a short length, so the “equivalent moment of inertia to motor shaft” JTV of the motor for driving the TV camera has a small value. Then, the corresponding ζTV calculated by equation is (28)ζTV=R2JTVLCeCm.If the smallJTV leads to 0<ζTV<1, the characteristic equation has a pair of conjugate complex roots with negative real part. So the two-order system is an underdamped system whose step response is a damped oscillatory process. In a dynamical process, oscillation causes the constantly changing of the missile boresight error ε, as the black lines shown in Figure 17. According to (18), the oscillation of ε makes the input λ˙ of the motor constantly change. Therefore, the dynamical response is oscillatory. Furthermore, when k is larger, which means that λ˙ is larger, the amplitude of the oscillation is greater. The results of the HIL simulation are consistent with the preceding theoretical analysis, as the blue lines shown in Figure 17.On the other hand, the target simulator is an aluminum rod with long length and large mass and the center of rotation is on one of its ends in the HIL simulation, so the “equivalent moment of inertia to motor shaft”JTarget of the motor for driving the target simulator is large. Then, the corresponding ζTarget calculated by equation is (29)ζTarget=R2JTargetLCeCm.If the largeJTarget leads to 1≤ζTarget, the characteristic equation has a pair of real roots. So the two-order system’s step response is a nonoscillatory process as the red lines shown in Figure 17. The HIL real-time simulation results and theoretical analysis are consistent.Figure20 shows the real-time state of the HIL simulation process. Figures 20(a) and 20(b) show the real-time scene that the seeker simulator is tracking the target simulator. Figure 20(c) is the guidance cabin which is showing its own states and the angle position of the seeker and target simulators. Figure 20(d) is the output interface of Simulink Real-Time which shows the key parameters such as the miss distance, command acceleration, and boresight error.Figure 20
The platform is implementing the TV guidance simulation.
(a)
(b)
(c)
(d)Based on the introduction above, the signal transmission process of the HIL simulation platform is achieved, as shown in Figure21.Figure 21
Signal transmission block diagram.In the simulation loop, the target simulator moves in accordance with the custom laws shown in (4); that is,(30)λ˙=RTM1VTM2-RTM2VTM1RTM2.The command angular velocity calculated by (18) drives the seeker simulator. The simulation model can acquire the LOS rate between the missile and the target. According to the proportional navigation guidance law, the command acceleration of the missile nc is obtained.


## 3.3. Simulation Results

The trajectory of the missile and the target is shown in Figure22. It can be seen from the figure that the missile intercepts the target successfully. Furthermore, the HIL real-time simulation trajectory is almost coincident with the mathematical simulation trajectory, which illustrates that the results of real-time simulation are correct. The miss distance is shown in Figure 23.Figure 22
Trajectory.Figure 23
Miss distance.During the HIL simulation, the relative distance between the missile and the target slips rapidly as the time goes on as can be seen in Figure23. The final miss distance of the HIL simulation is only 0.09846 m which is almost the theoretical 0 m, so the missile can destroy the target.As shown in Figure24, the actual LOS rate curve almost matches the theoretical curve. The initial value of the actual curve is larger, which is because that target is not in the center of the seeker FOV in the beginning as shown in Figure 25 according to (18). Although the actual curve fluctuates due to the principle shown in (18), the preceding results have illustrated that this phenomenon has no effect on the simulation process or the simulation results. As can be seen in Figure 25, the missile boresight error decreases rapidly after the missile is fired and finally goes to around zero as a result of the guidance law controlling the missile to enter the collision triangle.Figure 24
Actual and theoretical LOS.Figure 25
Missile boresight error.In order to illustrate the effectiveness of the HIL simulation platform better, we make the target do the S maneuver. After the seeker locks on the target, the seeker automatically tracks the target. As shown in Figure26, the seeker platform angle and LOS angle curves almost coincide. There is almost no delay.Figure 26
Seeker platform angle and LOS angle.


## 4. Other Functions of the Simulation Platform

The simulation platform can also be used to test the missile attitude response. Assuming that the initial yaw angle of the missile is0°, it is required to adjust to 30° in the shortest time. A PID angular position feedback controller is adopted in this example. The diagram of motor servo control is shown in Figure 27, which is similar to the ones in the “LOS” subsystem described in the above section. What is different is that the feedback of the controller is the angular position of the motor. Moreover, in the case of KP=6 and KI=2, the results achieved by the controller is well as shown in Figure 28, so KD is 0 in this example.Figure 27
The block diagram of motor servo control for yaw angle response testing.Figure 28
Yaw angle step response.It can be seen from Figure28 that there is nearly not any overshoot in the response process and the steady-state error is nearly zero. This is because that there is no disturbance present. The actual yaw angle reaches the command yaw angle within the time of 0.2 s. The above-mentioned facts indicate that the dynamic response characteristics of the missile are well.


## 5. Conclusions

From the above introduction and experiments, it can be concluded that the missile guidance system HIL simulation platform based on Simulink Real-Time can be used in the simulation loop of TV guidance simulation and navigation guidance law designing. The physical parts include TV seeker simulator, target simulator, servomotors, control cabin, and motion mechanism. The simulation process is real-time. Compared to the old results, the platform is more compact, lower cost, higher precision, and more practical.In addition, this HIL real-time simulation platform has some potential improvements in the future such as the following:(1)
Though the TV camera in this platform uses a manual zoom lens, the operator only manually adjusts the focus of the TV camera to make the image clear before the HIL simulation. On the other hand, the target silhouette is constant over the time in one simulation. Accordingly, the lens can be replaced by an automatic zoom lens driven through a servomotor, which enables the image of the target to be enlarged or reduced in order to simulate the change of the distance between the target and the seeker. Thus, the authenticity of missile-target engagement simulation will be further improved.(2)
The simulator has only one degree of freedom for missile moving and only one degree of freedom for target moving. So the design of a multidegree of freedom target simulator or a multidegree of freedom seeker simulator can be considered. The nut for fixing the TV camera shown in Figure4 can be replaced with a servomotor, which can provide a pitch freedom for the seeker simulator. Due to the small size of the turntable, designing a compact and flexible target simulator is also a worthy problem.Furthermore, the dynamic characteristics of the turntable and the motors can be modeled in detail, so a method can be designed for restraining the oscillation of the seeker simulator’s dynamic response.



---

*Source: 7834395-2017-05-11.xml*