How to Design an Observer in MATLAB?

6 views (last 30 days)
khawla mrad
khawla mrad on 26 Feb 2024
Commented: Sam Chak on 26 Feb 2024
i want to design an observer for a dynamic system using this matlab code. thank you clc; clear; close all; ts = [0 80]; % Solving system dynamics sol = ddesd(@sig, @tau, @his, ts); t = sol.x; y = sol.y; % System delay function function d = tau(t, y) d = [1.5 + sin(0.5*t)]; end function s = his(t) s = [1;0]; end % System dynamics function function yp = sig(t, y, Z) ylag1 = Z(:,1); yp = [-0.2620*y(1) - 2.3748*y(2) + 0.5*ylag1(2) + exp(-t)*sin(y(1)) + 1/(1+t.^2)*y(1); -0.6550*y(1) - 8.4370*y(2) + 0.2*ylag1(1) - ylag1(2) + exp(-t)*sin(y(2)) + 1/(1+t.^2)*y(2)]; end
  1 Comment
Sam Chak
Sam Chak on 26 Feb 2024
@khawla mrad, can you edit the post? It is very uncomfortable to read the code. Click this icon , please.

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!