Answered step by step
Verified Expert Solution
Question
1 Approved Answer
% Open - Loop Fault Detection, Isolation and Recovery System % % INITIAL SEGMENT % clear all % Define model parameters U 0 = 3
OpenLoop Fault Detection, Isolation and Recovery System
INITIAL SEGMENT
clear all
Define model parameters
U; ms
deltarmax pi ; Maximum rudder deflection rad
deltarratemax pi ; Maximum rudder rate limit rad
faulttime ; Time at which the stepwise fault occurs
faultvalue pi; Fault value to be added to the measurement
faulttime ; Time at which the driftwise fault occurs
faultvalue pi; Fault value to be added to the measurement
Initial Conditions of all inputs, states, and state derivatives
u ; Define Initial Simulation Input
x ; Define Initial Model States
xdot ; Define Initial Model State Derivatives
Define parameters for the simulation
stepsize ; Simulation step size
comminterval ; Communications interval
EndTime ; Simulation End Time
i ; Initialize counter for data storage
END OF INITIAL SEGMENT all parameters initialized
DYNAMIC SEGMENT
for time :stepsize:EndTime
STORAGE SECTION
Store time, state, and state derivative data every communication interval
if remtime comminterval
i i ; Increment counter
touti time; Store time
xouti :) x; Store states
xdouti :) xdot; Store state derivatives
uouti :) u; Store input
end
End of STORAGE SECTION
CONTROL SECTION
u;
if x If heading is greater than deg set rudder deflection to deg
u;
u u deltarratemax stepsize;
if u
u;
end
elseif x Otherwise, set rudder deflection to deg
u;
u u deltarratemax stepsize;
if u
u;
end
else
u u;
end
Apply stepwise fault to the sensor measurement
if time faulttime
x x faultvalue;
end
Apply driftwise fault to the sensor measurement
if time faulttime
x x faultvalue;
end
Apply stepwise fault to the rudder measurement
if time faulttime
u u faultvalue;
end
Apply driftwise fault to the rudder measurement
if time faulttime
u u faultvalue;
end
DERIVATIVE SECTION
xdot FDIRModelx u;
INTEGRATION SECTION
x rkintFDIRModel stepsize, x u; Fourth Order RungeKutta
end
END OF DYNAMIC SEGMENT
Given the above MATLAB scripts, Develop a kalman filter algorithm in MATLAB script to analyze the system's behaviour to determine when and
where these faults occur during the OpenLoopdeg deg zigzag manoeuvre
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started