I am working on a sun-synchronous satellite Simulink model wich determines its attitude from a Sun sensor and a star sensor whom measure the sun and star direction in the satellite body reference frame. I have to introduce measure errors on both sensors using a "white noise" Simulink block, but I prefer to generate the noise through a Matlab function block using the function "rand".
My issue is that I have to filter the noises on the measurements before sending them to a block who compute the attitude quaternion error to feed it to a PID controller blockset which commands a Reaction Wheels Assembly. Without noise the satellite flies smoothly.
I have tried some solution such as lowpass filter, Butterworth filter, mean on peaks and downs, but nothing seems to work properly.
I cannot figure out, for example, which should be the cut off frequency to set up on a lowpass filter ( I cannot figure out if the lowpass filter is the correct choice for such a problem, too).