Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %specificiranje sistema
- K=1;
- tau=100;
- n=[0 K];
- d=[tau 1];
- sistem = ss(tf(n,d));
- A = sistem.a;
- B = sistem.b;
- C = sistem.c;
- D = sistem.d;
- Ts = 1; %period uzorkovanja u sekundama
- model = LTISystem('A', A, 'B', B);
- model.x.min = 0;
- model.x.max = 100;
- model.u.min = 0;
- model.u.max = 5;
- model.x.with('reference');
- model.x.reference = 'free';
- model.x.penalty = QuadFunction( 5 );
- model.u.penalty = QuadFunction( 1 );
- ctrl = MPCController(model, 4);
- ectrl = ctrl.toExplicit();
- ectrl.feedback.fplot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement