Lego Mindstorms EV3 gyro sensor offset fix

I am currently working on a project for a Lego Mindstorms EV3 autopilot using Matlab/Simulink. Basically, I am using a closed loop control system with a PID controller for the control of the control surfaces. I'm using Simulink to construct the autopilot block diagram. The feedback loop consists of the gyro sensor. Now the gyro sensor is not accurate in the sense that it has some offset. It does not have any bias or noise. I need to get rid of the offset to give me the actual angle of the device. How could I solve this problem? I could use a low pass filter but how do I know what transfer function to use in Simulink?

...

• I do not know simulink, but from fast googling there should be possible to use TransferFnc ctms.engin.umich.edu/CTMS/Content/Basics/figures/… with numerator [1 -offsetdx] and numerator [1] Apr 30 '17 at 21:21