I'm currently investigating fault recovery in a UAV using MATLAB.
I've been given several variables:
- phi = the roll angle
- psi = the yaw/heading angle
- beta = the side slip
- p = roll rate
- r = yaw/heading rate
- delta_r = angle of the rudder
- delta_a = angle of the aileron (the aileron is currently inactive).
My input is the rudder angle.
I've simulated a step fault in the yaw/heading sensor and I'm trying to recover from it.
To detect that there was a fault in the heading sensors: I compared the actual side-slip with the modeled side slip. If there is a difference between the "real' system and the model in heading angle, but no difference in side-slip, then the heading sensor is faulty.
To recover from this fault: I want to reconfigure the side-slip so I can use it to determine the heading/yaw angle. In order to do this I need to multiply the side-slip by the transfer function between side-slip and heading/yaw angle.
We've been given the following equations:
I'm having some trouble coming up with a transfer function between side slip and heading angle.
I figured the best thing to do, as I am using a simulation filled with arrays, is to turn all the derivatives into their discrete equivalent - of course this is means I'm not using a transfer function, but an equation. Taking the equation for the derivative of beta and discretizing it...
When I plug this in, the system doesn't recover.
I even tried doing Laplace transforms, but I get stuck here:
And I'm not sure how I could apply that in MATLAB
Is there a mistake in my logic or approach? How would I turn the discrete system into a transfer function?