Simulink Matlab function out of bounds problem

Dear all, I have a problem with my Simulink model.
I made a closed loop control system with: plant( hexacopter model) and controller (Integrator backstepping).
The controller takes information about the system and State (Bus) of the drone as input. State has dimensionality 12 and is solution of drone dynamics system of differential equations.
The controller:
Simulation runs normally, everythisg is working, but I recieve list of 26 errors:
Diagnostic report shows no problem in controller code and State has dimensionality 12.
Next errors says that it is not possible to calculate some expressions becuase State contains 1 value, not 12.
When I try steps forward, State has dimensionality 12. The function contains only algebraic epressions and polynomial calculation.
If I try to close the controller with variable phid, this errors appears again and everithing crushes. The variable is not used at all.
Diagnostic report shows problems: State has dimensionality 1.
I tried to convert State(Bus) to vector or to Mux, doesn't work.
How can I avoid this problem and make my controller to work without errors?

Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Products

Asked:

on 27 Aug 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!