Matlab Simulation

Figure 1: 

As mentioned in the chapter Control Loop, a 2-layer cascading structure has been developed. This cascade control has been developed in Matlab Simulink. First of all the decoupling Simulink block has been developed. The inputs of this block are T, Tau_a, Tau_b and Tau_c. T is for the base thrust, the Tau variables are for the angle position in absolute value. The output of this block, Omega 1-4, is the input for the Quadrocopter block. The output values are between 0 and 255. Each Omega is for one specific engine. The outputs of the Quadrocopter block are the three velocity values directly from the sensor and the three absolute angle values from the Kalman filter. All this values are scoped to improve the control.
The velocity values are looped back into the first control loop. This control loop regulates the velocity of the angles. The second control loop regulates the absolute angles.
The inputs for the angles and for the base thrust are currently implemented as steps in Matlab. In further projects these blocks should be replaced with the input values from an input device (X-Box Controller, Joystick, 3D Mouse).