Effacer les filtres
Effacer les filtres

SIMULINK - Designing an observer to estimate all states resulting in solution singularity

3 vues (au cours des 30 derniers jours)
I am trying to design a Luenberger observer such that with one sensor available I can estimate all the states.
My system is 4th order:
NUM4 = [-0.00198 2];
DEN4 = [1 0.1201 12.22 0.4201 2];
sys = tf(NUM4,DEN4);
[A, B, C, D] = tf2ss(NUM4,DEN4);
First I have a row vector of poles to get my desired response:
p2 = [-2.6 + 1i*2.39, -2.6 - 1i*2.39, -100, -120];
K = place(A,B,p2)
I then proceed to calculate the plant poles and thus the poles I want for my observer should be around 3x faster
planteig=eig(A);
fastpoles = 3*planteig;
I then proceed to use Ackermann's formula for pole placement using the new poles:
L=acker(A',C',fastpoles);
L=L';
And finally plot:
mysys=ss(A-B*K,B,C,0);
step(74826*mysys)
Output:
All seems good up to this point, however I am trying to verify the results on Simulink and am having issue with the block diagram. As can be seen I have two state space models, one for the real plant and one for the observer.
correct sim.JPG
I am using the base workspace generated by the code above:
Upon running I get:
An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state '1' in block 'QuestionName/SS - observer' at time 9.2393711733808891E-6 is not finite.
The simulation will be stopped. There may be a singularity in the solution.
If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
Reducing the step size or tightening error tolerances from model properties settings have no effect. I think the problem is arising from how my simulink model is constructed but I'm unable to pinpoint the source of the error.
Any suggestions why this is happening or what I am doing wrong would be greatly appreciated.

Réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by