diff options
author | Nao Pross <np@0hm.ch> | 2024-05-14 01:05:15 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-05-14 01:05:15 +0200 |
commit | 868d27134a48f3de23139e873b867dba46b0d5ec (patch) | |
tree | 0d5c98573a2c95cc225e149c106335d640c11c2c /uav_model.m | |
parent | Prepare structure for endterm (diff) | |
download | uav-868d27134a48f3de23139e873b867dba46b0d5ec.tar.gz uav-868d27134a48f3de23139e873b867dba46b0d5ec.zip |
Improve console output
Diffstat (limited to '')
-rw-r--r-- | uav_model.m | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/uav_model.m b/uav_model.m index 3b691f4..0af0818 100644 --- a/uav_model.m +++ b/uav_model.m @@ -223,7 +223,7 @@ D = zeros(12, 5); % Create state space object T = params.measurements.SensorFusionDelay; n = params.linearization.PadeApproxOrder; -sys = minreal(pade(ss(A, B, C, D, 'OutputDelay', T), n)); +sys = minreal(pade(ss(A, B, C, D, 'OutputDelay', T), n), [], false); % slient % Save linearized dynamics (numerical) model.linear = struct(... @@ -241,7 +241,7 @@ eigvals = eig(A); % Check system controllability / stabilizability Wc = ctrb(sys); if rank(Wc) < nx - fprintf('Linearized system has %d uncontrollable states!\n', ... + fprintf(' - Linearized system has %d uncontrollable states!\n', ... (nx - rank(Wc))); % Is the system at least stabilizable? @@ -257,17 +257,17 @@ if rank(Wc) < nx end end if unstabilizable > 0 - fprintf('Linearized system has %d unstabilizable modes!\n', ... + fprintf(' - Linearized system has %d unstabilizable modes!\n', ... unstabilizable); else - fprintf('However, it is stabilizable.\n'); + fprintf(' However, it is stabilizable.\n'); end end % Check system observability / detectability Wo = obsv(sys); if rank(Wo) < nx - fprintf('Linearized system has %d unobservable states!\n', ... + fprintf(' - Linearized system has %d unobservable states!\n', ... (nx - rank(Wo))); % is the system at least detectable? undetectable = 0; @@ -281,10 +281,10 @@ if rank(Wo) < nx end end if undetectable > 0 - fprintf('Linearized system has %d undetectable modes!\n', ... + fprintf(' - Linearized system has %d undetectable modes!\n', ... undetectable); else - fprintf('However, it is detectable.\n') + fprintf(' However, it is detectable.\n') end end @@ -367,10 +367,12 @@ idx = model.uncertain.index; % Number of inputs model.uncertain.Nv = max(size(idx.InputUncertain)); -model.uncertain.Nr = max(size(idx.InputReference)); model.uncertain.Nw = max(size(idx.InputExogenous)); model.uncertain.Nu = max(size(idx.InputNominal)); +model.uncertain.Nr = max(size(idx.InputReference)); +% size of noise is (Nw - Nr) + % Number of outputs model.uncertain.Nz = max(size(idx.OutputUncertain)); model.uncertain.Ne = max(size(idx.OutputError)); |