Model of a missile with homing system¶
Let's show how to add a model of a homing system to a missile model, which will be triggered when a target is detected and bring the control object to the desired point in space.
Object dynamics model¶
The control object is a normal aerodynamic rocket with wings in the middle and rudders in the tail.
The main part of the object model is a nonlinear representation of rigid body dynamics (block 3DOF (Body Axes)
). The aerodynamic forces and moments acting on the rocket body are calculated based on coefficients that are represented by a nonlinear dependence on both Mach speed and angle of attack. These functions are stored in the model in tabular form, in blocks 2-D Lookup Table
.
The model also uses blocks from the Aerospace Systems palette such as the standard atmosphere model, which are common to all aerospace systems.
Description of the glider model¶
The dynamic airframe model consists of four main subsystems and an autopilot that controls the normal acceleration of the rocket through rudder movement. The Atmosphere, Angle of Attack and Airspeed subsystem calculates the effect of atmospheric conditions as a function of flight altitude. The Rudder Drive and Sensors subsystems link the autopilot model to the airframe model. The Aerodynamic Forces and Motion Model calculates the forces and moments acting on the rocket body and then calculates the motion model.
Atmosphere and airspeed¶
This model uses the standard block ISA Atmosphere Model
- ISA standard atmosphere model (ISA). Additional blocks calculate the velocity (in Mach) using the current speed of sound as well as the velocity head Q
.
Aerodynamic forces and coefficients¶
The Aerodynamic Forces subsystem calculates the forces and moments applied to the rocket in the body axes. Then the equations of motion that determine the linear and angular motion of the control object are integrated.
The aerodynamic coefficients are stored in tabular form and the instantaneous values during the simulation are determined by interpolation.
Autopilot model¶
The rocket's autopilot controls the altitude rudder based on a given normal acceleration. The accelerometer is placed close to the nose of the rocket, ahead of the centre of gravity. Its signal, with additional damping, is used to generate the control signal.
The autopilot coefficients were selected based on several linearised airframe models obtained for different flight conditions over the expected range. The model also includes a channel for saturation control (anti-windup) to prevent the controller from saturating when the autopilot signal goes out of tolerance.
We test the autopilot created in this way in the nonlinear model presented in this project.
Guidance loop¶
Two subsystems are responsible for finding and maintaining the target:
- Search/Tracking - returns an estimate of the current relative motion parameters between the missile and the target
- ** Guidance** - calculates the desired normal acceleration in pursuit mode and the desired sighting angle in search mode
Guidance system calculator¶
This subsystem provides control signals for the different systems:
- self-destruct signal when more than the specified time has elapsed since the target acquisition,
- a set angle of sight in target acquisition mode,
- a fixed command for normal acceleration in blind flight mode (final mode),
- the actual operating mode of the system,
- a signal to disarm the system.
Latin names are usually needed as a compromise for the code generator to work correctly.
The job computer controls the operation of all on-board systems via the variable Mode
(external variable Режим
). This variable is responsible for switching control modes. During target search the job computer directly controls the line-of-sight angle* by sending the Sigma_d
signal to the antenna pendant. When the target is **in range of the seeker beam ( Acquire
or Захват
signal), the system pauses for a preset time and then enters closed loop tracking mode. In the event of a possible loss of capture, the system first enters search mode and then self-destructs after a specified time.
The first finite state machine issues control commands for movement and tracking, and signals the second finite state machine id_timeout
when the allowable pursuit time is exceeded after loss of the target:
The second dispenser issues a disarm signal when the target is approaching (if the system is in RadarGuided
mode or when the standby time is exceeded.
Proportional control in tracking mode¶
After the seeker has acquired the target and up to collision (or self-liquefaction), a proportional control law is used to control the missile. This control law calculates the desired normal acceleration based on the following data:
- a measurement of the rate of approach between the missile and the target, which can be obtained from a Doppler tracking device if the homing head is equipped with radar,
- an estimate of the rate of change of line-of-sight angle (scan rate).
Tracking subsystem¶
This subsystem detects and tracks the target, controls the antenna orientation and keeps it on the target according to the control law. The time constant of the tracking loop tors
is 0.05 seconds and can be adjusted to balance the desired response speed with noise immunity. The stabilisation loop is responsible for correcting the antenna beam offset rate to account for the angular velocity of the body. Its coefficient is chosen based on the bandwidth of the gyroscope.
The system outputs, in addition to the state variables, an estimate of the target angular velocity - the smoothed sum of the antenna beam displacement velocity and the antenna-target angular velocity obtained from the radar. The filter bandwidth is equal to half of the autopilot bandwidth.
Fairing error¶
For radar-guided missiles, a common source of error is the fairing, which affects the reception delay and pattern. Typically, the magnitude of this error is computed from a nonlinear function taking the antenna orientation angle as input. Our model approximates this influence by a linear relationship between the antenna orientation angle (Gimbal
) and the magnitude of the distortion using the "Fairing Error" factor.
In this subsystem it is possible to realise models of other important errors, for example, the influence of overloads on gyroscope operation. These models will make it possible to check the reliability of the tracking and stabilisation loop controllers.
Start-up and demonstration of system operation¶
Now let's run the model for execution. In its Reverse calls the following initial parameters are set:
- the target is travelling at a constant speed of 328 m/s on an oncoming course
- the target is 500 metres below the antenna launch point
The result shows that capture occurs at 0.42 s after launch, then at 0.63 the system enters tracking mode, and collision occurred at 3.27 s.
model_name = "aero_guidance";
model_name in [m.name for m in engee.get_all_models()] ? engee.open(model_name) : engee.load( "$(@__DIR__)/$(model_name).engee");
res = engee.run( model_name );
Let's separate the desired signals:
Mach_speed = collect(res["Атмосфера, Угол атаки и Воздушная скорость.Скорость (Мах)"]);
sigma_antenna = collect(res["Слежение и оценка скорости сканирования.Ориентация антенны"]);
sigma_target = collect(res["Ориентация на цель.1"]);
sigma_rad = collect(res["Sigma_rad"]);
alpha = collect(res["Incidence & Airspeed.α"]);
mode = collect(res["Вычислитель системы наведения (100 Hz).Режим"]);
misile_traj = collect(res["Планер и Автопилот.Xe,Ze"]);
target_traj = collect(res["Положение цели.Цель"]);
Az = collect(res["Аэродинамические силы и Модель движения.Ax,Az"]);
Az_d = collect(res["Az_d.1"]);
fin_demand = collect(res["Автопилот.Заданное положение руля"]);
fin_position = collect(res["Привод руля.B"]);
model_stop = collect(res["Подрыв.Остановка"]);
Plot the state variables and visualise the trajectories:
gr()
plot(
plot( Az.time, [last.(Az.value) Az_d.value]./9.81, ls=[:solid :dash], ylabel="Нормальное ускорение [g]", label=["Истинное" "Заданное"], xlabel="Время [c]" ),
plot( alpha.time, rad2deg.(alpha.value), ylabel="Угол атаки [град]", xlabel="Время [c]", leg=false ),
plot( Mach_speed.time, Mach_speed.value, ylabel="Скорость [Мах]", xlabel="Время [c]", leg=false ),
plot( fin_demand.time, rad2deg.([fin_demand.value fin_position.value]), ls=[:solid :dash], ylabel="Работа руля [град]", label=["Управление" "Отклонение"], xlabel="Время [c]" ),
guidefont=font(8), lw=2, size=(800,400)
)
mode_change_idx = findall( diff(mode.value).>0 )
plot( sigma_target.time, rad2deg.(sigma_target.value), label="Ориентация на цель", ylimits=(-30,10), lw=2 )
plot!( sigma_antenna.time, rad2deg.(sigma_antenna.value), label="Ориентация антенны", ls=[:solid :dash], lw=2 )
vline!( [mode.time[mode_change_idx]], ls=:dash, label="Смена режима системы" )
plot!( guidefont=font(8), lw=2, size=(600,300), xlabel="Время [с]", ylabel="Ориентация на цель и угол антенны [град]" )
# Приведение разных сигналов к одному времени интегрирования
sample_time_factor = length(first.(target_traj.value)) / length(model_stop.value)
f_idx = 1:round(Int, findfirst(model_stop.value .> 0)*sample_time_factor)
plot( first.(target_traj.value)[f_idx], last.(target_traj.value)[f_idx], label="Цель", lw=2, ls=:dash )
plot!( first.(misile_traj.value)[f_idx], last.(misile_traj.value)[f_idx], label="Ракета", lw=2 )
plot!( guidefont=font(8), size=(600,400), xlabel="X[м]", ylabel="Z [м]" )
It is now easy to run the model for any set of input conditions and study its performance.
Conclusion¶
We have implemented a relatively complex model of a missile targeting system and traced its trajectory.
[2] Lebedev A.A., Chernobrovin L.S. Dynamics of flight of unmanned aerial vehicles. М. - 1973.