
clc
clear
format compact
tau_h=0.45;
tau_t=0.55;

%%%%%%%%% Start%%%%%%%%%%%%%%%%%
A=[ 0 1 0  0; ...
    0 0 0 -1; ...
    0 0 0  1; ...
    0 0 0 -1/tau_h]

B=[0; 0; 0; 1/tau_h]

C=[ 1 0 0 0 ; ...
    0 1 0 0 ; ...
    0 0 1 0 ]

D=[0; 0; 0]

E=[0; 1; 0; 0];



%%% zeitdisk. Beobachter

Ts=0.001;

A_td=[1 Ts 0 -0.5*Ts^2; 0 1 0 -Ts; 0 0 1 Ts; 0 0 0 (1-Ts/tau_h)];
B_td=[0; 0; 0; Ts/tau_h];
C_td=[1 0 0 0; 0 1 0 0 ; 0 0 1 0];
D_td=[0; 0; 0];


system_td=ss(A,B,C,D,Ts)

pole_strecke=eig(A_td)
sigma_td=[0.94 0.93 0.92 0.91]; %Pole des Beobachters

% Beobachtbarkeit prüfen
RANK_Beob=rank(obsv(system_td))



L_td=[place(A',C', sigma_td)]'

